Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: pkg/analyzer/test/generated/element_resolver_test.dart

Issue 2314963002: Remove the final error being generated in a scope (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.test.generated.element_resolver_test; 5 library analyzer.test.generated.element_resolver_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 InternalAnalysisContext context = AnalysisContextFactory.contextWithCore( 876 InternalAnalysisContext context = AnalysisContextFactory.contextWithCore(
877 resourceProvider: resourceProvider); 877 resourceProvider: resourceProvider);
878 Source source = new FileSource(resourceProvider.getFile("/test.dart")); 878 Source source = new FileSource(resourceProvider.getFile("/test.dart"));
879 CompilationUnitElementImpl unit = 879 CompilationUnitElementImpl unit =
880 new CompilationUnitElementImpl("test.dart"); 880 new CompilationUnitElementImpl("test.dart");
881 unit.librarySource = unit.source = source; 881 unit.librarySource = unit.source = source;
882 _definingLibrary = ElementFactory.library(context, "test"); 882 _definingLibrary = ElementFactory.library(context, "test");
883 _definingLibrary.definingCompilationUnit = unit; 883 _definingLibrary.definingCompilationUnit = unit;
884 _visitor = new ResolverVisitor( 884 _visitor = new ResolverVisitor(
885 _definingLibrary, source, _typeProvider, _listener, 885 _definingLibrary, source, _typeProvider, _listener,
886 nameScope: new LibraryScope(_definingLibrary, _listener)); 886 nameScope: new LibraryScope(_definingLibrary));
887 try { 887 try {
888 return _visitor.elementResolver; 888 return _visitor.elementResolver;
889 } catch (exception) { 889 } catch (exception) {
890 throw new IllegalArgumentException( 890 throw new IllegalArgumentException(
891 "Could not create resolver", exception); 891 "Could not create resolver", exception);
892 } 892 }
893 } 893 }
894 894
895 /** 895 /**
896 * Return the element associated with the label of [statement] after the 896 * Return the element associated with the label of [statement] after the
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 _visitor.labelScope = innerScope; 1028 _visitor.labelScope = innerScope;
1029 statement.accept(_resolver); 1029 statement.accept(_resolver);
1030 } finally { 1030 } finally {
1031 _visitor.labelScope = outerScope; 1031 _visitor.labelScope = outerScope;
1032 } 1032 }
1033 } catch (exception) { 1033 } catch (exception) {
1034 throw new IllegalArgumentException("Could not resolve node", exception); 1034 throw new IllegalArgumentException("Could not resolve node", exception);
1035 } 1035 }
1036 } 1036 }
1037 } 1037 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698