-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
Problems with "nested" type parameters #1921
Comments
Somebody can correct me if I'm wrong, but it seems like this should be allowed. Especially because it compiles okay if the |
I can confirm that this particular case is fixed with #1888 |
Unfortunately this PR is blocked by another issue (#1887), and I'm a bit too busy at the moment to implement the fix required for that one. Maybe we should just merge PR #1888 with the included workaround, and revert it later. |
I am creating an instance of a type-parameterized class from a type parameterized trait.
Both type parameters are unconstrained.
I feed the class a type parameter that is also an unconstrained type parameter.
the compiler complains:
CLASS_TYPE_PARAMETER #any is not a subtype of TRAIT_TYPE_PARAMETER #any: the subtype has no constraint
.In my superficial understanding of the type system, it should be possible to use an unconstrained type param for another unconstrained type param.
This small snippet illustrates my problem:
This is what the compiler says:
The text was updated successfully, but these errors were encountered: