|
|
Fix analyzer's handling of import prefixes not followed by '.'.
If 'p' is an import prefix, then 'p = ...' is treated as synonymous
with 'this.p = ...', and 'p()' is treated as synonymous with
'this.p()'. In all other circumstances where 'p' is not followed by
'.', the spec calls for a compile time error.
Previous to this CL, 'p' not followed by '.' was being treated as
synonymous with 'this.p' under all circumstances. This CL brings
analyzer in line with the spec, and updates the tests in
tests/language accordingly.
The VM and Dart2js currently fail to implement the compile-time error
properly. See issues #23611 and #23612.
Fixes issue #23461.
R=scheglov@google.com
Committed: https://github.com/dart-lang/sdk/commit/fc83ce5ba97cf98fc628ab736c7cbf443ab0e93e
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+389 lines, -61 lines) |
Patch |
 |
M |
pkg/analyzer/lib/src/generated/element_resolver.dart
|
View
|
|
8 chunks |
+37 lines, -23 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/error.dart
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
View
|
|
3 chunks |
+69 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/generated/non_error_resolver_test.dart
|
View
|
|
2 chunks |
+44 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/generated/static_type_warning_code_test.dart
|
View
|
|
2 chunks |
+81 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/generated/static_warning_code_test.dart
|
View
|
|
1 chunk |
+0 lines, -27 lines |
0 comments
|
Download
|
 |
M |
tests/language/conditional_method_invocation_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/language/conditional_property_access_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/language/conditional_property_assignment_test.dart
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
A + |
tests/language/empty_library.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/language/if_null_assignment_behavior_test.dart
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tests/language/language.status
|
View
|
|
1 chunk |
+10 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tests/language/language_analyzer2.status
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
tests/language/language_dart2js.status
|
View
|
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
 |
A |
tests/language/prefix_assignment_test.dart
|
View
|
|
1 chunk |
+46 lines, -0 lines |
0 comments
|
Download
|
 |
A |
tests/language/prefix_identifier_reference_test.dart
|
View
|
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
 |
A |
tests/language/prefix_unqualified_invocation_test.dart
|
View
|
|
1 chunk |
+45 lines, -0 lines |
0 comments
|
Download
|
Total messages: 6 (2 generated)
|