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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.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/kernel/kernel_named_type_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
index e41d72bb2b866a74d09b127642b68c79d70d07e1..702294d0bdde348e0784feb5c206677b946f38ce 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
@@ -6,7 +6,12 @@ library fasta.kernel_interface_type_builder;
import 'package:kernel/ast.dart' show DartType, DynamicType, Supertype;
-import '../messages.dart' show templateTypeNotFound, warning;
+import '../messages.dart'
+ show
+ templateSupertypeIsIllegal,
+ templateSupertypeIsTypeVariable,
+ templateTypeNotFound,
+ warning;
import 'kernel_builder.dart'
show
@@ -43,11 +48,11 @@ class KernelNamedTypeBuilder
}
Supertype handleInvalidSupertype(LibraryBuilder library) {
- String message = builder.isTypeVariable
- ? "The type variable '$name' can't be used as supertype."
- : "The type '$name' can't be used as supertype.";
- library.deprecated_addCompileTimeError(charOffset, message,
- fileUri: fileUri);
+ var template = builder.isTypeVariable
+ ? templateSupertypeIsTypeVariable
+ : templateSupertypeIsIllegal;
+ library.addCompileTimeError(
+ template.withArguments(name), charOffset, fileUri);
return null;
}

Powered by Google App Engine
This is Rietveld 408576698