Skip to content

Commit 9dade98

Browse files
committed
Fixes
(1) Drop unused error message (2) Drop test which is now illegal
1 parent 353a4d9 commit 9dade98

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

compiler/src/dotty/tools/dotc/reporting/diagnostic/ErrorMessageID.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public enum ErrorMessageID {
3232
ByNameParameterNotSupportedID,
3333
WrongNumberOfTypeArgsID,
3434
IllegalVariableInPatternAlternativeID,
35-
TypeParamsTypeExpectedID,
3635
IdentifierExpectedID,
3736
AuxConstructorNeedsNonImplicitParameterID,
3837
IncorrectRepeatedParameterSyntaxID,

compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -691,19 +691,6 @@ object messages {
691691
}
692692
}
693693

694-
case class TypeParamsTypeExpected(mods: untpd.Modifiers, identifier: TermName)(implicit ctx: Context)
695-
extends Message(TypeParamsTypeExpectedID) {
696-
val kind = "Syntax"
697-
val msg = hl"""Expected ${"type"} keyword for type parameter $identifier"""
698-
val explanation =
699-
hl"""|This happens when you add modifiers like ${"private"} or ${"protected"}
700-
|to your type parameter definition without adding the ${"type"} keyword.
701-
|
702-
|Add ${"type"} to your code, e.g.:
703-
|${s"trait A[${mods.flags} type $identifier]"}
704-
|"""
705-
}
706-
707694
case class IdentifierExpected(identifier: String)(implicit ctx: Context)
708695
extends Message(IdentifierExpectedID) {
709696
val kind = "Syntax"
@@ -1138,7 +1125,7 @@ object messages {
11381125
|
11391126
|You may want to create an anonymous class extending ${cls.name} with
11401127
| ${s"class ${cls.name} { }"}
1141-
|
1128+
|
11421129
|or add a companion object with
11431130
| ${s"object ${cls.name} extends ${cls.name}"}
11441131
|

compiler/test/dotty/tools/dotc/parsing/ModifiersParsingTest.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ class ModifiersParsingTest {
9595

9696
source = "class A[T]"
9797
assert(source.firstTypeParam.modifiers == List())
98-
99-
source = "class A[type T]"
100-
assert(source.firstTypeParam.modifiers == List(Mod.Type()))
10198
}
10299

103100
@Test def typeDef = {

0 commit comments

Comments
 (0)