mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
parent
26117e8d93
commit
c0e42bbfc8
@ -613,6 +613,11 @@ class Stitcher:
|
||||
break
|
||||
old_typedtree_hash = typedtree_hash
|
||||
|
||||
# When we have an excess of type information, sometimes we can infer every type
|
||||
# in the AST without discovering every referenced attribute of host objects, so
|
||||
# do one last pass unconditionally.
|
||||
inferencer.visit(self.typedtree)
|
||||
|
||||
# After we have found all functions, synthesize a module to hold them.
|
||||
source_buffer = source.Buffer("", "<synthesized>")
|
||||
self.typedtree = asttyped.ModuleT(
|
||||
|
20
artiq/test/lit/embedding/bug_477.py
Normal file
20
artiq/test/lit/embedding/bug_477.py
Normal file
@ -0,0 +1,20 @@
|
||||
# RUN: %python -m artiq.compiler.testbench.embedding %s
|
||||
|
||||
from artiq.experiment import *
|
||||
|
||||
class MyClass:
|
||||
def __init__(self, **kwargs):
|
||||
for k, v in kwargs.items():
|
||||
setattr(self, k, v)
|
||||
|
||||
|
||||
sl = [MyClass(x=1), MyClass(x=2)]
|
||||
|
||||
@kernel
|
||||
def bug(l):
|
||||
for c in l:
|
||||
print(c.x)
|
||||
|
||||
@kernel
|
||||
def entrypoint():
|
||||
bug(sl)
|
Loading…
Reference in New Issue
Block a user