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

Problem with generic constraints on a generic specialization of the same type #200

Open
masonwheeler opened this issue May 15, 2019 · 0 comments

Comments

@masonwheeler
Copy link
Contributor

class Foo[of T(IComparable[of T])]:
    pass

Foo[of int]() // error occurs here

Expected: This should work, as Int32 implements IComparable<Int32>.
Observed: The generic type checker errors out here, as it incorrectly checks whether int implements the generic IComparable[of T], rather than the reified IComparable[of int].

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