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

Unified Diff: pkg/front_end/lib/src/fasta/loader.dart

Issue 2977713002: Remove deprecated api from LibraryBuilder. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/loader.dart
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index c2a791aa71392c324de66538772b38a3ba290e59..08fa08f19c91f5496456f486eb91d12af4418d5a 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -13,7 +13,8 @@ import 'builder/builder.dart' show Builder, LibraryBuilder;
import 'deprecated_problems.dart'
show firstSourceUri, deprecated_printUnexpected;
-import 'messages.dart' show LocatedMessage, Message, templateUnspecified;
+import 'messages.dart'
+ show LocatedMessage, Message, messagePlatformPrivateLibraryAccess;
import 'target_implementation.dart' show TargetImplementation;
@@ -103,8 +104,8 @@ abstract class Loader<L> {
uri.scheme == "dart" &&
uri.path.startsWith("_") &&
accessor.uri.scheme != "dart") {
- accessor.deprecated_addCompileTimeError(
- charOffset, "Can't access platform private library.");
+ accessor.addCompileTimeError(
+ messagePlatformPrivateLibraryAccess, charOffset, accessor.fileUri);
}
return builder;
}
@@ -179,17 +180,6 @@ ${format(ms / libraryCount, 3, 12)} ms/compilation unit.""");
.add(message.withLocation(fileUri, charOffset));
}
- void deprecated_addCompileTimeError(
- Uri fileUri, int charOffset, String message,
- {bool silent: false, bool wasHandled: false}) {
- if (!silent) {
- deprecated_printUnexpected(fileUri, charOffset, message);
- }
- (wasHandled ? handledErrors : unhandledErrors).add(templateUnspecified
- .withArguments(message)
- .withLocation(fileUri, charOffset));
- }
-
Builder getAbstractClassInstantiationError() {
return target.getAbstractClassInstantiationError(this);
}

Powered by Google App Engine
This is Rietveld 408576698