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

Side by Side Diff: lib/src/checker/resolver.dart

Issue 954773003: rename package:ddc to package:dev_compiler (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 | « lib/src/checker/checker.dart ('k') | lib/src/checker/rules.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) 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 /// Encapsulates how to invoke the analyzer resolver and overrides how it 5 /// Encapsulates how to invoke the analyzer resolver and overrides how it
6 /// computes types on expressions to use our restricted set of types. 6 /// computes types on expressions to use our restricted set of types.
7 library ddc.src.checker.resolver; 7 library ddc.src.checker.resolver;
8 8
9 import 'package:analyzer/analyzer.dart'; 9 import 'package:analyzer/analyzer.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
11 import 'package:analyzer/src/generated/element.dart'; 11 import 'package:analyzer/src/generated/element.dart';
12 import 'package:analyzer/src/generated/engine.dart'; 12 import 'package:analyzer/src/generated/engine.dart';
13 import 'package:analyzer/src/generated/error.dart'; 13 import 'package:analyzer/src/generated/error.dart';
14 import 'package:analyzer/src/generated/java_io.dart' show JavaFile; 14 import 'package:analyzer/src/generated/java_io.dart' show JavaFile;
15 import 'package:analyzer/src/generated/resolver.dart'; 15 import 'package:analyzer/src/generated/resolver.dart';
16 import 'package:analyzer/src/generated/static_type_analyzer.dart'; 16 import 'package:analyzer/src/generated/static_type_analyzer.dart';
17 import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk; 17 import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
18 import 'package:analyzer/src/generated/source.dart' show DartUriResolver; 18 import 'package:analyzer/src/generated/source.dart' show DartUriResolver;
19 import 'package:analyzer/src/generated/source.dart' show Source; 19 import 'package:analyzer/src/generated/source.dart' show Source;
20 import 'package:analyzer/src/generated/source_io.dart'; 20 import 'package:analyzer/src/generated/source_io.dart';
21 import 'package:logging/logging.dart' as logger; 21 import 'package:logging/logging.dart' as logger;
22 22
23 import 'package:ddc/src/options.dart'; 23 import 'package:dev_compiler/src/options.dart';
24 import 'package:ddc/src/report.dart'; 24 import 'package:dev_compiler/src/report.dart';
25 import 'package:ddc/src/utils.dart'; 25 import 'package:dev_compiler/src/utils.dart';
26 import 'dart_sdk.dart'; 26 import 'dart_sdk.dart';
27 import 'multi_package_resolver.dart'; 27 import 'multi_package_resolver.dart';
28 28
29 final _log = new logger.Logger('ddc.src.resolver'); 29 final _log = new logger.Logger('ddc.src.resolver');
30 30
31 /// Encapsulates a resolver from the analyzer package. 31 /// Encapsulates a resolver from the analyzer package.
32 class TypeResolver { 32 class TypeResolver {
33 final InternalAnalysisContext context; 33 final InternalAnalysisContext context;
34 34
35 final Map<Uri, Source> _sources = <Uri, Source>{}; 35 final Map<Uri, Source> _sources = <Uri, Source>{};
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 element.returnType.isDynamic && 419 element.returnType.isDynamic &&
420 node.returnType == null) { 420 node.returnType == null) {
421 var type = searchTypeFor(element.enclosingElement.type, element); 421 var type = searchTypeFor(element.enclosingElement.type, element);
422 if (type != null && !type.returnType.isDynamic) { 422 if (type != null && !type.returnType.isDynamic) {
423 element.returnType = type.returnType; 423 element.returnType = type.returnType;
424 } 424 }
425 } 425 }
426 return res; 426 return res;
427 } 427 }
428 } 428 }
OLDNEW
« no previous file with comments | « lib/src/checker/checker.dart ('k') | lib/src/checker/rules.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698