OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library analyzer.src.dart.constant.evaluation; | 5 library analyzer.src.dart.constant.evaluation; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/context/declared_variables.dart'; | 9 import 'package:analyzer/context/declared_variables.dart'; |
10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 } | 755 } |
756 } | 756 } |
757 } | 757 } |
758 // Evaluate explicit or implicit call to super(). | 758 // Evaluate explicit or implicit call to super(). |
759 InterfaceType superclass = definingClass.superclass; | 759 InterfaceType superclass = definingClass.superclass; |
760 if (superclass != null && !superclass.isObject) { | 760 if (superclass != null && !superclass.isObject) { |
761 ConstructorElement superConstructor = | 761 ConstructorElement superConstructor = |
762 superclass.lookUpConstructor(superName, constructor.library); | 762 superclass.lookUpConstructor(superName, constructor.library); |
763 if (superConstructor != null) { | 763 if (superConstructor != null) { |
764 if (superArguments == null) { | 764 if (superArguments == null) { |
765 superArguments = astFactory.nodeList/*<Expression>*/(null); | 765 superArguments = astFactory.nodeList<Expression>(null); |
766 } | 766 } |
767 | 767 |
768 evaluateSuperConstructorCall(node, fieldMap, superConstructor, | 768 evaluateSuperConstructorCall(node, fieldMap, superConstructor, |
769 superArguments, initializerVisitor, externalErrorReporter); | 769 superArguments, initializerVisitor, externalErrorReporter); |
770 } | 770 } |
771 } | 771 } |
772 reportLocalErrorForRecordedExternalErrors(); | 772 reportLocalErrorForRecordedExternalErrors(); |
773 return new DartObjectImpl( | 773 return new DartObjectImpl( |
774 definingClass, new GenericState(fieldMap, invocation: invocation)); | 774 definingClass, new GenericState(fieldMap, invocation: invocation)); |
775 } | 775 } |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 } | 2130 } |
2131 | 2131 |
2132 @override | 2132 @override |
2133 String toString() { | 2133 String toString() { |
2134 if (value == null) { | 2134 if (value == null) { |
2135 return "error"; | 2135 return "error"; |
2136 } | 2136 } |
2137 return value.toString(); | 2137 return value.toString(); |
2138 } | 2138 } |
2139 } | 2139 } |
OLD | NEW |