-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Inference can't guess type argument of LinkedHashSet based on type argument of Set constructor #32634
Comments
Quite similar to #31865 |
It is indeed a duplicate of #31865. Dart 2 doesn't do inference on partial types, only on missing type arguments in expressions (basically in instance creation expressions and generic method calls). |
I don't think this is a duplicate. The Analyzer/Compiler error here isn't about |
Isn't the default Line 49 in 0b2684e
... regardless, I don't see why this is an error, it should be valid to assign a In @Hixie's case, his code looks totally valid, I think the CFE/Dart2 is doing the wrong thing (TM). |
Yes, but that is an implementation detail, it is not exposed through the signature. Nor, in my opinion, should it be.
That is valid and is not the error. |
The issue here is that the type of the variable is Reading issue in #31865 again, it's not exactly the same problem, but it boils down to the issue that there is no inference for |
Right, this bug was requesting that the variable be typed using inference instead of defaulting to dynamic. |
It seems unambiguous that that should be a
LinkedHashSet<int>
.The text was updated successfully, but these errors were encountered: