File tree 3 files changed +1
-18
lines changed
src/dotty/tools/dotc/reporting/diagnostic
test/dotty/tools/dotc/parsing 3 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ public enum ErrorMessageID {
32
32
ByNameParameterNotSupportedID ,
33
33
WrongNumberOfTypeArgsID ,
34
34
IllegalVariableInPatternAlternativeID ,
35
- TypeParamsTypeExpectedID ,
36
35
IdentifierExpectedID ,
37
36
AuxConstructorNeedsNonImplicitParameterID ,
38
37
IncorrectRepeatedParameterSyntaxID ,
Original file line number Diff line number Diff line change @@ -691,19 +691,6 @@ object messages {
691
691
}
692
692
}
693
693
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
-
707
694
case class IdentifierExpected (identifier : String )(implicit ctx : Context )
708
695
extends Message (IdentifierExpectedID ) {
709
696
val kind = " Syntax"
@@ -1138,7 +1125,7 @@ object messages {
1138
1125
|
1139
1126
|You may want to create an anonymous class extending ${cls.name} with
1140
1127
| ${s " class ${cls.name} { } " }
1141
- |
1128
+ |
1142
1129
|or add a companion object with
1143
1130
| ${s " object ${cls.name} extends ${cls.name}" }
1144
1131
|
Original file line number Diff line number Diff line change @@ -95,9 +95,6 @@ class ModifiersParsingTest {
95
95
96
96
source = " class A[T]"
97
97
assert(source.firstTypeParam.modifiers == List ())
98
-
99
- source = " class A[type T]"
100
- assert(source.firstTypeParam.modifiers == List (Mod .Type ()))
101
98
}
102
99
103
100
@ Test def typeDef = {
You can’t perform that action at this time.
0 commit comments