Index: pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart |
index dac7d72beda9ee237ddcde85d14cb110773cbd50..889918b027066674a7ecc38e812d8ad2c9140938 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart |
@@ -9,6 +9,8 @@ import 'package:kernel/ast.dart' |
import '../deprecated_problems.dart' show deprecated_inputError; |
+import '../fasta_codes.dart' show templateTypeArgumentsOnTypeVariable; |
+ |
import 'kernel_builder.dart' |
show |
KernelClassBuilder, |
@@ -33,9 +35,10 @@ class KernelTypeVariableBuilder |
DartType buildType( |
LibraryBuilder library, List<KernelTypeBuilder> arguments) { |
if (arguments != null) { |
- library.deprecated_addWarning(arguments.first.charOffset, |
- "Can't use type arguments with type parameter $parameter", |
- fileUri: fileUri); |
+ library.addWarning( |
+ templateTypeArgumentsOnTypeVariable.withArguments(name), |
+ arguments.first.charOffset, |
+ arguments.first.fileUri); |
} |
return new TypeParameterType(parameter); |
} |