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

Issue 2025853002: Introduces "--initializing-formal-access". (Closed)

Created:
4 years, 6 months ago by eernst
Modified:
4 years, 6 months ago
Reviewers:
Johnni Winther
CC:
reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Introduces "--initializing-formal-access". This CL adjusts the treatment of initializing formals, such that they can be used in initializers and in constructor bodies. E.g., `x` can be used as in `C(this.x) : y = x { var z = x + 2; }`. It hides the new feature under the option '--initializing-formal-access' which is used in the test 'initializing_formal_access_test.dart'. It also adds an `example` test to `MessageKind.DUPLICATE_DEFINITION` to verify that name clashes among initializing formals and other parameters are detected (which was previously not the case). Finally, it fixes a typo in a comment, `InitializingFormalParameter` -> `InitializingFormalElement`. R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/b80a73775cb1ba2539667a067ce608485cc136b7

Patch Set 1 #

Patch Set 2 : Removed temporary tests #

Patch Set 3 : Eliminated unnecessary changes, thus avoiding 35 failing tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -5 lines) Patch
M pkg/compiler/lib/src/commandline_options.dart View 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/compile_time_constants.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/dart2js.dart View 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/diagnostics/messages.dart View 1 chunk +9 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/elements/elements.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/elements/modelx.dart View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/options.dart View 5 chunks +9 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/resolution/members.dart View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/typechecker.dart View 1 2 1 chunk +4 lines, -1 line 0 comments Download
A tests/language/initializing_formal_access_test.dart View 1 chunk +28 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 chunk +3 lines, -0 lines 0 comments Download
M tests/language/language_analyzer2.status View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
eernst
Small feature enhancement: Allow for access to initializing formals, e.g., using `x` as in `C(this.x) ...
4 years, 6 months ago (2016-05-31 09:52:28 UTC) #2
Johnni Winther
lgtm
4 years, 6 months ago (2016-05-31 10:37:52 UTC) #3
eernst
PTAL: Eliminated overriding methods `isParameter` and `isInstanceMember` in `InitializingFormalElementX`, such that it avoids breaking the ...
4 years, 6 months ago (2016-05-31 13:08:40 UTC) #4
Johnni Winther
lgtm
4 years, 6 months ago (2016-05-31 13:23:10 UTC) #5
eernst
4 years, 6 months ago (2016-05-31 13:39:15 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
b80a73775cb1ba2539667a067ce608485cc136b7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698