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

Unified Diff: lib/src/resolvers.dart

Issue 1830403002: switch package to strong mode (Closed) Base URL: git@github.com:dart-lang/code_transformers.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/resolver_impl.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/resolvers.dart
diff --git a/lib/src/resolvers.dart b/lib/src/resolvers.dart
index d951664412a9563c85ec65c0fee7ddb93a5c17f5..392aaffaaf9565425d90c490cdba1d22c298640a 100644
--- a/lib/src/resolvers.dart
+++ b/lib/src/resolvers.dart
@@ -37,11 +37,12 @@ class Resolvers {
/// resolvers object is used. Any time that [Resolvers#get] or
/// [Resolver#resolve] are called it will update the sources globally when
/// this option is in use.
- final Map<AssetId, dynamic> sharedSources;
+ final Map<AssetId, AssetBasedSource> sharedSources;
Resolvers.fromSdk(this.dartSdk, this.dartUriResolver,
{this.options, bool useSharedSources})
- : sharedSources = useSharedSources == true ? <AssetId, dynamic>{} : null;
+ : sharedSources =
+ useSharedSources == true ? <AssetId, AssetBasedSource>{} : null;
factory Resolvers(dartSdkDirectory,
{AnalysisOptions options, bool useSharedSources}) {
@@ -93,14 +94,14 @@ abstract class ResolverTransformer implements Transformer {
/// See [Resolver#resolve] for more info - can be overridden by a subclass.
bool get resolveAllLibraries => true;
- /// By default only process prossible entry point assets.
+ /// By default only process possible entry point assets.
///
/// This is only a preliminary check based on the asset ID.
Future<bool> isPrimary(assetOrId) {
// assetOrId is to handle the transition from Asset to AssetID between
// pub 1.3 and 1.4. Once support for 1.3 is dropped this should only
// support AssetId.
- var id = assetOrId is AssetId ? assetOrId : assetOrId.id;
+ var id = assetOrId is AssetId ? assetOrId : (assetOrId as Asset).id;
return new Future.value(isPossibleDartEntryId(id));
}
« no previous file with comments | « lib/src/resolver_impl.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698