Skip to content

Commit 55b512d

Browse files
committed
Delete message class
This error can no longer be raised.
1 parent 05126a2 commit 55b512d

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public enum ErrorMessageID {
5050
ExpectedTokenButFoundID,
5151
MixedLeftAndRightAssociativeOpsID,
5252
CantInstantiateAbstractClassOrTraitID,
53-
AnnotatedPrimaryConstructorRequiresModifierOrThisID,
53+
DUMMY_AVAILABLE_1,
5454
OverloadedOrRecursiveMethodNeedsResultTypeID,
5555
RecursiveValueNeedsResultTypeID,
5656
CyclicReferenceInvolvingID,

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

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,21 +1135,6 @@ object messages {
11351135
|""".stripMargin
11361136
}
11371137

1138-
case class AnnotatedPrimaryConstructorRequiresModifierOrThis(cls: Name)(implicit ctx: Context)
1139-
extends Message(AnnotatedPrimaryConstructorRequiresModifierOrThisID) {
1140-
val kind = "Syntax"
1141-
val msg = hl"""${"private"}, ${"protected"}, or ${"this"} expected for annotated primary constructor"""
1142-
val explanation =
1143-
hl"""|When using annotations with a primary constructor of a class,
1144-
|the annotation must be followed by an access modifier
1145-
|(${"private"} or ${"protected"}) or ${"this"}.
1146-
|
1147-
|For example:
1148-
| ${"class Sample @deprecated this(param: Parameter) { ..."}
1149-
| ^^^^
1150-
|""".stripMargin
1151-
}
1152-
11531138
case class OverloadedOrRecursiveMethodNeedsResultType(tree: Names.TermName)(implicit ctx: Context)
11541139
extends Message(OverloadedOrRecursiveMethodNeedsResultTypeID) {
11551140
val kind = "Syntax"
@@ -1277,7 +1262,7 @@ object messages {
12771262
|$noParameters""".stripMargin
12781263

12791264
}
1280-
1265+
12811266
case class AmbiguousOverload(tree: tpd.Tree, alts: List[SingleDenotation], pt: Type)(
12821267
err: typer.ErrorReporting.Errors)(
12831268
implicit ctx: Context)
@@ -1296,7 +1281,7 @@ object messages {
12961281
|- adding a type ascription as in `${"instance.myMethod: String => Int"}`
12971282
|"""
12981283
}
1299-
1284+
13001285
case class ReassignmentToVal(name: Names.Name)(implicit ctx: Context)
13011286
extends Message(ReassignmentToValID) {
13021287
val kind = "Reference"

0 commit comments

Comments
 (0)