| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 /** | 262 /** |
| 263 * If `true`, mixins are allowed to inherit from types other than Object, and | 263 * If `true`, mixins are allowed to inherit from types other than Object, and |
| 264 * are allowed to reference `super`. | 264 * are allowed to reference `super`. |
| 265 */ | 265 */ |
| 266 final bool enableSuperMixins; | 266 final bool enableSuperMixins; |
| 267 | 267 |
| 268 /** | 268 /** |
| 269 * Initialize a newly created error verifier. | 269 * Initialize a newly created error verifier. |
| 270 */ | 270 */ |
| 271 ErrorVerifier(this._errorReporter, this._currentLibrary, this._typeProvider, | 271 ErrorVerifier(this._errorReporter, this._currentLibrary, this._typeProvider, |
| 272 this._typeSystem, this._inheritanceManager, this.enableSuperMixins) { | 272 this._inheritanceManager, this.enableSuperMixins) { |
| 273 this._isInSystemLibrary = _currentLibrary.source.isInSystemLibrary; | 273 this._isInSystemLibrary = _currentLibrary.source.isInSystemLibrary; |
| 274 this._hasExtUri = _currentLibrary.hasExtUri; | 274 this._hasExtUri = _currentLibrary.hasExtUri; |
| 275 _isEnclosingConstructorConst = false; | 275 _isEnclosingConstructorConst = false; |
| 276 _isInCatchClause = false; | 276 _isInCatchClause = false; |
| 277 _isInStaticVariableDeclaration = false; | 277 _isInStaticVariableDeclaration = false; |
| 278 _isInInstanceVariableDeclaration = false; | 278 _isInInstanceVariableDeclaration = false; |
| 279 _isInInstanceVariableInitializer = false; | 279 _isInInstanceVariableInitializer = false; |
| 280 _isInConstructorInitializer = false; | 280 _isInConstructorInitializer = false; |
| 281 _isInStaticMethod = false; | 281 _isInStaticMethod = false; |
| 282 _boolType = _typeProvider.boolType; | 282 _boolType = _typeProvider.boolType; |
| 283 _intType = _typeProvider.intType; | 283 _intType = _typeProvider.intType; |
| 284 _DISALLOWED_TYPES_TO_EXTEND_OR_IMPLEMENT = _typeProvider.nonSubtypableTypes; | 284 _DISALLOWED_TYPES_TO_EXTEND_OR_IMPLEMENT = _typeProvider.nonSubtypableTypes; |
| 285 _typeSystem = _currentLibrary.context.typeSystem; |
| 285 } | 286 } |
| 286 | 287 |
| 287 @override | 288 @override |
| 288 Object visitAnnotation(Annotation node) { | 289 Object visitAnnotation(Annotation node) { |
| 289 _checkForInvalidAnnotationFromDeferredLibrary(node); | 290 _checkForInvalidAnnotationFromDeferredLibrary(node); |
| 290 return super.visitAnnotation(node); | 291 return super.visitAnnotation(node); |
| 291 } | 292 } |
| 292 | 293 |
| 293 @override | 294 @override |
| 294 Object visitArgumentList(ArgumentList node) { | 295 Object visitArgumentList(ArgumentList node) { |
| (...skipping 5781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6076 toCheck.add(type.element); | 6077 toCheck.add(type.element); |
| 6077 // type arguments | 6078 // type arguments |
| 6078 if (type is InterfaceType) { | 6079 if (type is InterfaceType) { |
| 6079 InterfaceType interfaceType = type; | 6080 InterfaceType interfaceType = type; |
| 6080 for (DartType typeArgument in interfaceType.typeArguments) { | 6081 for (DartType typeArgument in interfaceType.typeArguments) { |
| 6081 _addTypeToCheck(typeArgument); | 6082 _addTypeToCheck(typeArgument); |
| 6082 } | 6083 } |
| 6083 } | 6084 } |
| 6084 } | 6085 } |
| 6085 } | 6086 } |
| OLD | NEW |