|
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
|
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
|
Total messages: 7 (2 generated)
|