dart-sdk/tests/lib_2
Paul Berry f5a3bce734 Fix scope resolution of metadata on type parameters
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>
2021-08-17 15:17:02 +00:00
..
analyzer
async [cfe] Remove isOptOutTest work-around 2021-08-04 10:44:00 +00:00
collection Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
convert Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
developer Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
html Remove obsolete internal dart2js annotations 2021-08-04 23:27:18 +00:00
isolate [vm, isolate] Also apply fast copying to an isolate's initial message. 2021-08-12 20:25:30 +00:00
js [cfe] Remove isOptOutTest work-around 2021-08-04 10:44:00 +00:00
math Fix behavior for -infinity width/height of rectangles. 2021-06-21 13:29:39 +00:00
mirrors Fix scope resolution of metadata on type parameters 2021-08-17 15:17:02 +00:00
typed_data [testing] Rely on language versions in the analyzer tests 2021-06-02 07:47:46 +00:00
wasm Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
web Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
lib_2.status [vm/concurrency] Enable more isolate tests, remove outdated TODOs, fix 2 tests 2021-07-16 07:51:58 +00:00
lib_2_app_jit.status
lib_2_dart2js.status Optimize js_util callMethod calls for 0-4 arguments. 2021-06-30 20:11:44 +00:00
lib_2_dartdevc.status Refactored html/js_util_test.dart and added more js_util test coverage. 2021-02-24 00:58:47 +00:00
lib_2_kernel.status [SDK] Removes non-exiting tests from .status 2021-02-04 06:46:13 +00:00
lib_2_precompiled.status
lib_2_vm.status [vm/concurrency] Enable more isolate tests, remove outdated TODOs, fix 2 tests 2021-07-16 07:51:58 +00:00