|
Fix analyzer's treatment of mixin constructors.
This changes analyzer to match the spec (and the VM behavior) with
regard to which base class constructors are forwarded through mixin
applications: only those constructors that take zero optional
parameters are forwarded. In addition, the tests in tests/language/
are updated to match analyzer and the VM.
There is one small difference between analyzer and the VM behavior:
the spec says that if no constructors are forwarded at all, then the
mixin application will automatically acquire an implicit default
constructor. The VM behavior is to issue an error in this
circumstance. After consulting with Gilad, it seems like the VM
behavior is more consistent with the intent, so I've chosen to make
analyzer and the tests match the VM behavior, in the hopes that the
spec can be changed accordingly.
Should we change our minds in the future and decide that we want to
keep the spec as is, the tests and analyzer behavior can easily be
changed.
BUG=dartbug.com/19576
R=brianwilkerson@google.com
Committed: https://code.google.com/p/dart/source/detail?r=41645
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+522 lines, -34 lines) |
Patch |
|
M |
pkg/analyzer/lib/src/generated/element.dart
|
View
|
|
2 chunks |
+23 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/generated/element_handle.dart
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/generated/element_resolver.dart
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/generated/error.dart
|
View
|
1
2
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/generated/error_verifier.dart
|
View
|
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/generated/resolver.dart
|
View
|
1
2
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/all_the_rest.dart
|
View
|
|
1 chunk |
+77 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
View
|
|
5 chunks |
+228 lines, -3 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/resolver_test.dart
|
View
|
|
1 chunk |
+103 lines, -0 lines |
0 comments
|
Download
|
|
M |
tests/language/language.status
|
View
|
|
2 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
tests/language/language_analyzer.status
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
tests/language/language_dart2js.status
|
View
|
1
|
2 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
tests/language/mixin_forwarding_constructor2_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A + |
tests/language/mixin_forwarding_constructor3_test.dart
|
View
|
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
A |
tests/language/mixin_forwarding_constructor4_test.dart
|
View
|
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
|
M |
tests/language/mixin_super_constructor_named_test.dart
|
View
|
|
2 chunks |
+9 lines, -8 lines |
0 comments
|
Download
|
|
M |
tests/language/mixin_super_constructor_positionals_test.dart
|
View
|
|
3 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
Total messages: 6 (1 generated)
|