Chromium Code Reviews| Index: lib/src/checker/checker.dart |
| diff --git a/lib/src/checker/checker.dart b/lib/src/checker/checker.dart |
| index f11aef694ff1ac139d46db6066191c78d3d8860f..9af11723fd1185be526e08b1cb760d478c7ab944 100644 |
| --- a/lib/src/checker/checker.dart |
| +++ b/lib/src/checker/checker.dart |
| @@ -373,10 +373,14 @@ class CodeChecker extends RecursiveAstVisitor { |
| node.visitChildren(this); |
| final init = node.initializers; |
| - for (int i = 0, last = init.length - 1; i < last; i++) { |
| + for (int i = 0, last = init.length - 1; i <= last; i++) { |
| final node = init[i]; |
| - if (node is SuperConstructorInvocation) { |
| + if (i != last && node is SuperConstructorInvocation) { |
| _recordMessage(new InvalidSuperInvocation(node)); |
| + } else if (node is ConstructorFieldInitializer) { |
| + var field = node.fieldName; |
| + DartType staticType = _rules.elementType(field.staticElement); |
| + node.expression = checkAssignment(node.expression, staticType); |
| } |
|
Leaf
2015/02/26 22:00:16
A little surprising that this isn't in a separate
vsm
2015/02/26 23:55:47
Done.
|
| } |
| } |