| 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 engine.resolver.error_verifier; | 5 library engine.resolver.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/src/generated/static_type_analyzer.dart'; | 10 import 'package:analyzer/src/generated/static_type_analyzer.dart'; |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 return super.visitDefaultFormalParameter(node); | 577 return super.visitDefaultFormalParameter(node); |
| 578 } | 578 } |
| 579 | 579 |
| 580 @override | 580 @override |
| 581 Object visitDoStatement(DoStatement node) { | 581 Object visitDoStatement(DoStatement node) { |
| 582 _checkForNonBoolCondition(node.condition); | 582 _checkForNonBoolCondition(node.condition); |
| 583 return super.visitDoStatement(node); | 583 return super.visitDoStatement(node); |
| 584 } | 584 } |
| 585 | 585 |
| 586 @override | 586 @override |
| 587 Object visitEnumDeclaration(EnumDeclaration node) { |
| 588 ClassElement outerClass = _enclosingClass; |
| 589 try { |
| 590 _isInNativeClass = false; |
| 591 _enclosingClass = node.element; |
| 592 return super.visitEnumDeclaration(node); |
| 593 } finally { |
| 594 _enclosingClass = outerClass; |
| 595 } |
| 596 } |
| 597 |
| 598 @override |
| 587 Object visitExportDirective(ExportDirective node) { | 599 Object visitExportDirective(ExportDirective node) { |
| 588 ExportElement exportElement = node.element; | 600 ExportElement exportElement = node.element; |
| 589 if (exportElement != null) { | 601 if (exportElement != null) { |
| 590 LibraryElement exportedLibrary = exportElement.exportedLibrary; | 602 LibraryElement exportedLibrary = exportElement.exportedLibrary; |
| 591 _checkForAmbiguousExport(node, exportElement, exportedLibrary); | 603 _checkForAmbiguousExport(node, exportElement, exportedLibrary); |
| 592 _checkForExportDuplicateLibraryName(node, exportElement, exportedLibrary); | 604 _checkForExportDuplicateLibraryName(node, exportElement, exportedLibrary); |
| 593 _checkForExportInternalLibrary(node, exportElement); | 605 _checkForExportInternalLibrary(node, exportElement); |
| 594 } | 606 } |
| 595 return super.visitExportDirective(node); | 607 return super.visitExportDirective(node); |
| 596 } | 608 } |
| (...skipping 5383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5980 toCheck.add(type.element); | 5992 toCheck.add(type.element); |
| 5981 // type arguments | 5993 // type arguments |
| 5982 if (type is InterfaceType) { | 5994 if (type is InterfaceType) { |
| 5983 InterfaceType interfaceType = type; | 5995 InterfaceType interfaceType = type; |
| 5984 for (DartType typeArgument in interfaceType.typeArguments) { | 5996 for (DartType typeArgument in interfaceType.typeArguments) { |
| 5985 _addTypeToCheck(typeArgument); | 5997 _addTypeToCheck(typeArgument); |
| 5986 } | 5998 } |
| 5987 } | 5999 } |
| 5988 } | 6000 } |
| 5989 } | 6001 } |
| OLD | NEW |