| 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.resolver; | 5 library analyzer.src.generated.resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 } | 2496 } |
| 2497 if (element == null) { | 2497 if (element == null) { |
| 2498 if (_enclosingClass != null) { | 2498 if (_enclosingClass != null) { |
| 2499 element = | 2499 element = |
| 2500 _findIdentifier(_enclosingClass.typeParameters, parameterName); | 2500 _findIdentifier(_enclosingClass.typeParameters, parameterName); |
| 2501 } else if (_enclosingAlias != null) { | 2501 } else if (_enclosingAlias != null) { |
| 2502 element = | 2502 element = |
| 2503 _findIdentifier(_enclosingAlias.typeParameters, parameterName); | 2503 _findIdentifier(_enclosingAlias.typeParameters, parameterName); |
| 2504 } | 2504 } |
| 2505 } | 2505 } |
| 2506 if (element == null) { |
| 2507 String name = parameterName.name; |
| 2508 int offset = parameterName.offset; |
| 2509 _mismatch( |
| 2510 'Could not find type parameter with name "$name" at $offset', node); |
| 2511 } |
| 2506 super.visitTypeParameter(node); | 2512 super.visitTypeParameter(node); |
| 2507 _resolveMetadata(node.metadata, element); | 2513 _resolveMetadata(node.metadata, element); |
| 2508 return null; | 2514 return null; |
| 2509 } | 2515 } |
| 2510 | 2516 |
| 2511 @override | 2517 @override |
| 2512 Object visitVariableDeclaration(VariableDeclaration node) { | 2518 Object visitVariableDeclaration(VariableDeclaration node) { |
| 2513 VariableElement element = null; | 2519 VariableElement element = null; |
| 2514 SimpleIdentifier variableName = node.name; | 2520 SimpleIdentifier variableName = node.name; |
| 2515 if (_enclosingExecutable != null) { | 2521 if (_enclosingExecutable != null) { |
| (...skipping 10269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12785 nonFields.add(node); | 12791 nonFields.add(node); |
| 12786 return null; | 12792 return null; |
| 12787 } | 12793 } |
| 12788 | 12794 |
| 12789 @override | 12795 @override |
| 12790 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 12796 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
| 12791 | 12797 |
| 12792 @override | 12798 @override |
| 12793 Object visitWithClause(WithClause node) => null; | 12799 Object visitWithClause(WithClause node) => null; |
| 12794 } | 12800 } |
| OLD | NEW |