Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TList() type annotations for kernels broken #632

Closed
jordens opened this issue Nov 29, 2016 · 0 comments
Closed

TList() type annotations for kernels broken #632

jordens opened this issue Nov 29, 2016 · 0 comments

Comments

@jordens
Copy link
Member

jordens commented Nov 29, 2016

from artiq.experiment import *

class T(EnvExperiment):
    def build(self):
        self.setattr_device("core")

    @kernel
    def run(self):
        self.quux(1)
        self.foo([1])
        self.bar([1])

    @kernel
    def quux(self, a: TInt32):  # works
        pass

    @kernel
    def bar(self, a):  # works
        pass

    @kernel
    def foo(self, a: TList(TInt32)):  # breaks
        pass
t.py:23:22-23:35: error: unrecognized type annotation
    def foo(self, a: TList(TInt32)):
                     ^^^^^^^^^^^^^
t.py:11:9-11:17: note: while inferring a type for an attribute 'foo' of a host object
        self.foo([1])
        ^^^^^^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants