|
Introduces "--initializing-formal-access".
This CL is an adjusted version of CL 2025853002, adding updates to
`InitializingFormalElementZ` to match the updates applied to
`InitializingFormalElementX`, and adding the new option to the
`MessageKind.DUPLICATE_DEFINITION` example.
Description from 2025853002:
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/c35caf253efcd497dcdfc0603a56b8bdd34f2d07
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+81 lines, -6 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
|
|
2 chunks |
+10 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 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
|
|
3 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/serialization/modelz.dart
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/typechecker.dart
|
View
|
|
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
|
Total messages: 8 (3 generated)
|