mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 20:51:19 +00:00
f5a3bce734
Previously, when encountering identifiers in metadata on a class's type parameter, the analyzer would resolve them using the type parameter scope, but then fall back on using implicit `this`. The CFE would resolve them using the class body scope. In both cases, the end result was that the annotation could refer to static class members. This change brings the behavior of both the analyzer and the CFE in line with the spec, by preventing the use of implicit `this` in these annotations, and resolving them in the type parameter scope. This is not expected to break any code in practice, because annotations on type parameters are rare, as are annotations referring to static class members, and the overlap between these two should be negligibly small. Fixes https://github.com/dart-lang/language/issues/1790. Bug: https://github.com/dart-lang/language/issues/1790 Change-Id: Ibe5a421e04a53d29074a8b1509e1390658ed72e5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210040 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> |
||
---|---|---|
.. | ||
analyzer | ||
async | ||
collection | ||
convert | ||
developer | ||
html | ||
isolate | ||
js | ||
math | ||
mirrors | ||
typed_data | ||
wasm | ||
web | ||
lib_2.status | ||
lib_2_app_jit.status | ||
lib_2_dart2js.status | ||
lib_2_dartdevc.status | ||
lib_2_kernel.status | ||
lib_2_precompiled.status | ||
lib_2_vm.status |