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

Compiler doesn't allow class Member to be a specific alternative subtype #418

Open
braxtonmckee opened this issue Jan 19, 2023 · 0 comments

Comments

@braxtonmckee
Copy link
Collaborator

For instance,

T = Alternative("T", X=dict(x=int), Y=dict(y=float))

class C(Class):
    anX = Member(T.X)

    def __init__(self):
        self.anX = T.X()

Doesn't work, both because the call to T.X() knows the result as T, not T.X (which is just imprecise) and because we don't have appropriate converters set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant