-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[analyzer] Failure in language/constants_2018/constant_types_test/04 #47302
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
Comments
/cc @scheglov. |
Do we allow type variables only when |
This is all part of the |
tests/language/const/instantiated_function_constant_test.dart exercises this new rule too. |
…nstants(). We need to check for more features now. Bug: #47302 Change-Id: I601160aa4133e25695ead18d180f7efd2e410300 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215005 Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
It seems that type variables were already allowed as "potentially constant type expression" for null safety. So, my understanding is that now we enable them as "potentially constant expression" when |
Exactly, thanks! |
Bug: #47302 Change-Id: I95d1b94efe5cc2877d37bc5ac615869233395189 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215014 Reviewed-by: Samuel Rawlins <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
Additionally, I see that _deferred types_ are not constant, and make great examples of non-const function references, constructor references, and type literals. Fixes language/const/constant_type_variable_test Bug: #46020, #47302 Change-Id: I9df3a9eb758d058888f7d374b76756ec1443c8d6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215860 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
…bled. This requires passing the runtime type arguments into the InstanceCreationEvaluator, so that it can store them in a lexical scope map. Bug: #47302 Change-Id: I6b9d660f20b981d26810f29858784c034cc8abfd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215960 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
CL https://dart-review.googlesource.com/c/sdk/+/214644 changed said test such that it expects to use a type variable in the initializer list of a constant constructor as a type literal without error:
This used to be a compile-time error, but with dart-lang/language#1860 it is no longer an error (a type variable used as an expression is a potentially constant expression).
This is part of the constructor-tearoffs feature bundle and part of the work requested in #47150.
NB: Due to a glitch in Gerrit (which has been reported), the change does not cause any buildbots to turn red, and there will not be an approval for the failure. This issue would have been the one to mention in that approval.
The text was updated successfully, but these errors were encountered: