| 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 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5034 * See [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH]. | 5034 * See [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH]. |
| 5035 */ | 5035 */ |
| 5036 void _checkForRethrowOutsideCatch(RethrowExpression expression) { | 5036 void _checkForRethrowOutsideCatch(RethrowExpression expression) { |
| 5037 if (!_isInCatchClause) { | 5037 if (!_isInCatchClause) { |
| 5038 _errorReporter.reportErrorForNode( | 5038 _errorReporter.reportErrorForNode( |
| 5039 CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH, expression); | 5039 CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH, expression); |
| 5040 } | 5040 } |
| 5041 } | 5041 } |
| 5042 | 5042 |
| 5043 /** | 5043 /** |
| 5044 * Check that if the the given constructor [declaration] is generative, then | 5044 * Check that if the given constructor [declaration] is generative, then |
| 5045 * it does not have an expression function body. | 5045 * it does not have an expression function body. |
| 5046 * | 5046 * |
| 5047 * See [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]. | 5047 * See [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]. |
| 5048 */ | 5048 */ |
| 5049 void _checkForReturnInGenerativeConstructor( | 5049 void _checkForReturnInGenerativeConstructor( |
| 5050 ConstructorDeclaration declaration) { | 5050 ConstructorDeclaration declaration) { |
| 5051 // ignore factory | 5051 // ignore factory |
| 5052 if (declaration.factoryKeyword != null) { | 5052 if (declaration.factoryKeyword != null) { |
| 5053 return; | 5053 return; |
| 5054 } | 5054 } |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6234 class _InvocationCollector extends RecursiveAstVisitor { | 6234 class _InvocationCollector extends RecursiveAstVisitor { |
| 6235 final List<String> superCalls = <String>[]; | 6235 final List<String> superCalls = <String>[]; |
| 6236 | 6236 |
| 6237 @override | 6237 @override |
| 6238 visitMethodInvocation(MethodInvocation node) { | 6238 visitMethodInvocation(MethodInvocation node) { |
| 6239 if (node.target is SuperExpression) { | 6239 if (node.target is SuperExpression) { |
| 6240 superCalls.add(node.methodName.name); | 6240 superCalls.add(node.methodName.name); |
| 6241 } | 6241 } |
| 6242 } | 6242 } |
| 6243 } | 6243 } |
| OLD | NEW |