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

Side by Side Diff: pkg/analyzer/test/src/task/strong_mode_test.dart

Issue 2983293002: Remove toplevel inference restriction hints, and restore as much (Closed)
Patch Set: Keep error filter Created 3 years, 5 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/test/src/task/strong/inferred_type_test.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.src.task.strong_mode_test; 5 library analyzer.test.src.task.strong_mode_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
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 13 matching lines...) Expand all
24 defineReflectiveTests(VariableGathererTest); 24 defineReflectiveTests(VariableGathererTest);
25 }); 25 });
26 } 26 }
27 27
28 @reflectiveTest 28 @reflectiveTest
29 class InstanceMemberInferrerTest extends ResolverTestCase { 29 class InstanceMemberInferrerTest extends ResolverTestCase {
30 InstanceMemberInferrer createInferrer(LibraryElement library) { 30 InstanceMemberInferrer createInferrer(LibraryElement library) {
31 AnalysisContext context = library.context; 31 AnalysisContext context = library.context;
32 var inheritanceManager = new InheritanceManager(library); 32 var inheritanceManager = new InheritanceManager(library);
33 return new InstanceMemberInferrer( 33 return new InstanceMemberInferrer(
34 context.typeProvider, (_) => inheritanceManager, new Set(), 34 context.typeProvider, (_) => inheritanceManager,
35 typeSystem: context.typeSystem); 35 typeSystem: context.typeSystem);
36 } 36 }
37 37
38 /** 38 /**
39 * Add a source with the given [content] and return the result of resolving 39 * Add a source with the given [content] and return the result of resolving
40 * the source. 40 * the source.
41 */ 41 */
42 Future<CompilationUnitElement> resolve(String content) async { 42 Future<CompilationUnitElement> resolve(String content) async {
43 Source source = addNamedSource('/test.dart', content); 43 Source source = addNamedSource('/test.dart', content);
44 if (enableNewAnalysisDriver) { 44 if (enableNewAnalysisDriver) {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 489 }
490 } 490 }
491 } 491 }
492 '''); 492 ''');
493 var analysisResult = await computeAnalysisResult(source); 493 var analysisResult = await computeAnalysisResult(source);
494 VariableGatherer gatherer = new VariableGatherer(filter); 494 VariableGatherer gatherer = new VariableGatherer(filter);
495 analysisResult.unit.accept(gatherer); 495 analysisResult.unit.accept(gatherer);
496 return gatherer.results; 496 return gatherer.results;
497 } 497 }
498 } 498 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/task/strong/inferred_type_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698