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

Issue 2435013003: Teach analyzer parser to handle native const factories/const constructors. (Closed)

Created:
4 years, 2 months ago by Vyacheslav Egorov (Google)
Modified:
4 years, 2 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org, Brian Wilkerson
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Teach analyzer parser to handle native const factories/const constructors. This is needed to parse VM patch files, which contain things like: @patch const factory String.fromEnvironment(String name, {String defaultValue}) native "String_fromEnvironment"; Currently analyzer would throw "Only redirecting factory constructors can be declared to be 'const'." error when it sees this code. BUG= R=paulberry@google.com Committed: https://github.com/dart-lang/sdk/commit/1f6e03883eec3f18ef09a0166344a5b6e96ce1fe

Patch Set 1 #

Patch Set 2 : add a test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -2 lines) Patch
M pkg/analyzer/lib/src/generated/parser.dart View 2 chunks +3 lines, -2 lines 0 comments Download
M pkg/analyzer/test/generated/non_error_resolver_test.dart View 1 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Vyacheslav Egorov (Google)
PTAL
4 years, 2 months ago (2016-10-20 15:58:41 UTC) #2
Paul Berry
Can you add a test to pkg/analyzer/test/generated/non_error_resolver_test.dart which verifies that no error is generated?
4 years, 2 months ago (2016-10-20 16:14:38 UTC) #3
Vyacheslav Egorov (Google)
Added a test. PTAL
4 years, 2 months ago (2016-10-20 16:36:13 UTC) #4
Paul Berry
lgtm
4 years, 2 months ago (2016-10-20 17:30:16 UTC) #5
Vyacheslav Egorov (Google)
4 years, 2 months ago (2016-10-20 18:09:11 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
1f6e03883eec3f18ef09a0166344a5b6e96ce1fe (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698