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 55ed848eef30eafc97c2189ba099c98cdb9b606f..e0472a2d03a99db9d70604d592e3849b83180d7d 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 |
@@ -33,11 +33,11 @@ class KernelTypeVariableBuilder |
DartType buildType( |
LibraryBuilder library, List<KernelTypeBuilder> arguments) { |
if (arguments != null) { |
- return inputError(null, null, |
- "Can't use type arguments with type parameter $parameter"); |
- } else { |
- return new TypeParameterType(parameter); |
+ library.addWarning(arguments.first.charOffset, |
ahe
2017/07/05 07:55:24
This test uses a type variable with arguments and
|
+ "Can't use type arguments with type parameter $parameter", |
+ fileUri: fileUri); |
} |
+ return new TypeParameterType(parameter); |
} |
DartType buildTypesWithBuiltArguments( |
@@ -55,6 +55,7 @@ class KernelTypeVariableBuilder |
} |
void finish(LibraryBuilder library, KernelClassBuilder object) { |
- parameter.bound = bound?.build(library) ?? object.buildType(library, null); |
+ parameter.bound ??= |
+ bound?.build(library) ?? object.buildType(library, null); |
} |
} |