Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index 2be86b948d5e585a3bea3c26cf6c4de549078218..9cd04a3f032ec97746e0053492738ae93d5cc91c 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -4677,6 +4677,11 @@ void Parser::ParseClassDefinition(const Class& cls) { |
} |
ExpectToken(Token::kRBRACE); |
+ if (cls.LookupTypeParameter(class_name) != TypeParameter::null()) { |
+ ReportError(class_pos, |
+ "class name conflicts with type parameter '%s'", |
+ class_name.ToCString()); |
+ } |
CheckConstructors(&members); |
// Need to compute this here since MakeArray() will clear the |