Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Issue 1173523002: Fix analyzer's handling of import prefixes not followed by '.'. (Closed)

Created:
5 years, 6 months ago by Paul Berry
Modified:
5 years, 6 months ago
Reviewers:
scheglov, hausner
CC:
reviews_dartlang.org, Siggi Cherem (dart-lang), hausner, gbracha
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

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

Patch Set 1 #

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

Messages

Total messages: 6 (2 generated)
Paul Berry
5 years, 6 months ago (2015-06-09 04:15:18 UTC) #2
scheglov
LGTM
5 years, 6 months ago (2015-06-09 05:54:09 UTC) #3
hausner
Thanks for filing the bug. I hope this is an oversight of the spec. Treating ...
5 years, 6 months ago (2015-06-09 16:32:55 UTC) #5
Paul Berry
5 years, 6 months ago (2015-06-09 20:38:58 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
fc83ce5ba97cf98fc628ab736c7cbf443ab0e93e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698