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.generated.error_verifier; | 5 library analyzer.src.generated.error_verifier; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import "dart:math" as math; | 8 import "dart:math" as math; |
9 | 9 |
10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 | 893 |
894 @override | 894 @override |
895 Object visitImplementsClause(ImplementsClause node) { | 895 Object visitImplementsClause(ImplementsClause node) { |
896 node.interfaces.forEach(_checkForImplicitDynamicType); | 896 node.interfaces.forEach(_checkForImplicitDynamicType); |
897 return super.visitImplementsClause(node); | 897 return super.visitImplementsClause(node); |
898 } | 898 } |
899 | 899 |
900 @override | 900 @override |
901 Object visitImportDirective(ImportDirective node) { | 901 Object visitImportDirective(ImportDirective node) { |
902 ImportElement importElement = node.element; | 902 ImportElement importElement = node.element; |
| 903 if (node.prefix != null) { |
| 904 _checkForBuiltInIdentifierAsName( |
| 905 node.prefix, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME); |
| 906 } |
903 if (importElement != null) { | 907 if (importElement != null) { |
904 _checkForImportDuplicateLibraryName(node, importElement); | 908 _checkForImportDuplicateLibraryName(node, importElement); |
905 _checkForImportInternalLibrary(node, importElement); | 909 _checkForImportInternalLibrary(node, importElement); |
906 } | 910 } |
907 return super.visitImportDirective(node); | 911 return super.visitImportDirective(node); |
908 } | 912 } |
909 | 913 |
910 @override | 914 @override |
911 Object visitIndexExpression(IndexExpression node) { | 915 Object visitIndexExpression(IndexExpression node) { |
912 _checkForArgumentTypeNotAssignableForArgument(node.index); | 916 _checkForArgumentTypeNotAssignableForArgument(node.index); |
(...skipping 6173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7086 class _InvocationCollector extends RecursiveAstVisitor { | 7090 class _InvocationCollector extends RecursiveAstVisitor { |
7087 final List<String> superCalls = <String>[]; | 7091 final List<String> superCalls = <String>[]; |
7088 | 7092 |
7089 @override | 7093 @override |
7090 visitMethodInvocation(MethodInvocation node) { | 7094 visitMethodInvocation(MethodInvocation node) { |
7091 if (node.target is SuperExpression) { | 7095 if (node.target is SuperExpression) { |
7092 superCalls.add(node.methodName.name); | 7096 superCalls.add(node.methodName.name); |
7093 } | 7097 } |
7094 } | 7098 } |
7095 } | 7099 } |
OLD | NEW |