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

Side by Side Diff: pkg/analyzer/lib/src/summary/summary_sdk.dart

Issue 2659403002: Fix hints and warnings. (Closed)
Patch Set: Rebased on e4c8a99f67f6846dffae69d1f4c745f1085d2680. Created 3 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
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.src.summary.summary_sdk; 5 library analyzer.src.summary.summary_sdk;
6 6
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/dart/element/type.dart'; 8 import 'package:analyzer/dart/element/type.dart';
9 import 'package:analyzer/file_system/file_system.dart' show ResourceProvider; 9 import 'package:analyzer/file_system/file_system.dart' show ResourceProvider;
10 import 'package:analyzer/src/context/context.dart'; 10 import 'package:analyzer/src/context/context.dart';
11 import 'package:analyzer/src/dart/element/type.dart'; 11 import 'package:analyzer/src/dart/element/type.dart';
12 import 'package:analyzer/src/generated/constant.dart'; 12 import 'package:analyzer/src/generated/constant.dart';
13 import 'package:analyzer/src/generated/engine.dart'; 13 import 'package:analyzer/src/generated/engine.dart';
14 import 'package:analyzer/src/generated/resolver.dart'; 14 import 'package:analyzer/src/generated/resolver.dart';
15 import 'package:analyzer/src/generated/sdk.dart'; 15 import 'package:analyzer/src/generated/sdk.dart';
16 import 'package:analyzer/src/generated/source.dart' 16 import 'package:analyzer/src/generated/source.dart'
17 show DartUriResolver, Source, SourceFactory; 17 show DartUriResolver, Source, SourceFactory;
18 import 'package:analyzer/src/generated/testing/element_factory.dart';
19 import 'package:analyzer/src/summary/idl.dart'; 18 import 'package:analyzer/src/summary/idl.dart';
20 import 'package:analyzer/src/summary/package_bundle_reader.dart'; 19 import 'package:analyzer/src/summary/package_bundle_reader.dart';
21 20
22 /** 21 /**
23 * An implementation of [DartSdk] which provides analysis results for `dart:` 22 * An implementation of [DartSdk] which provides analysis results for `dart:`
24 * libraries from the given summary file. This implementation is limited and 23 * libraries from the given summary file. This implementation is limited and
25 * suitable only for command-line tools, but not for IDEs - it does not 24 * suitable only for command-line tools, but not for IDEs - it does not
26 * implement [sdkLibraries], [sdkVersion], [uris] and [fromFileUri]. 25 * implement [sdkLibraries], [sdkVersion], [uris] and [fromFileUri].
27 */ 26 */
28 class SummaryBasedDartSdk implements DartSdk { 27 class SummaryBasedDartSdk implements DartSdk {
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 * throw a [StateError] if there is no class with the given name. 342 * throw a [StateError] if there is no class with the given name.
344 */ 343 */
345 InterfaceType _getType(LibraryElement library, String name) { 344 InterfaceType _getType(LibraryElement library, String name) {
346 Element element = library.getType(name); 345 Element element = library.getType(name);
347 if (element == null) { 346 if (element == null) {
348 throw new StateError("No definition of type $name"); 347 throw new StateError("No definition of type $name");
349 } 348 }
350 return (element as ClassElement).type; 349 return (element as ClassElement).type;
351 } 350 }
352 } 351 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | pkg/front_end/lib/src/fasta/analyzer/mock_type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698