@@ -1199,7 +1199,6 @@ object messages {
1199
1199
extends Message (SuperQualMustBeParentID ) {
1200
1200
1201
1201
val msg = hl """ | $qual does not name a parent of $cls"""
1202
-
1203
1202
val kind = " Reference"
1204
1203
1205
1204
private val parents : Seq [String ] = (cls.info.parents map (_.name.show)).sorted
@@ -1214,36 +1213,32 @@ object messages {
1214
1213
}
1215
1214
1216
1215
case class VarArgsParamMustComeLast ()(implicit ctx : Context )
1217
- extends Message (IncorrectRepeatedParameterSyntaxID ) {
1218
- override def msg : String = " varargs parameter must come last"
1219
-
1220
- override def kind : String = " Syntax"
1221
-
1222
- override def explanation : String =
1216
+ extends Message (IncorrectRepeatedParameterSyntaxID ) {
1217
+ val msg = " varargs parameter must come last"
1218
+ val kind = " Syntax"
1219
+ val explanation =
1223
1220
hl """ |The varargs field must be the last field in the method signature.
1224
1221
|Attempting to define a field in a method signature after a varargs field is an error.
1225
- | """ .stripMargin
1222
+ | """
1226
1223
}
1227
1224
1228
1225
case class AmbiguousOverload (tree : tpd.Tree , alts : List [SingleDenotation ], pt : Type )(
1229
1226
err : typer.ErrorReporting .Errors )(
1230
1227
implicit ctx : Context )
1231
1228
extends Message (AmbiguousOverloadID ) {
1232
1229
1233
- private def all = if (alts.length == 2 ) " both" else " all"
1234
-
1235
- override def msg : String =
1230
+ private val all = if (alts.length == 2 ) " both" else " all"
1231
+ val msg =
1236
1232
s """ |Ambiguous overload. The ${err.overloadedAltsStr(alts)}
1237
1233
| $all match ${err.expectedTypeStr(pt)}""" .stripMargin
1238
-
1239
- override def kind : String = " Reference"
1240
-
1241
- override def explanation : String =
1242
- s """ |There are ${alts.length} methods that could be referenced as the compiler knows too little about the expected type.
1234
+ val kind = " Reference"
1235
+ val explanation =
1236
+ hl """ |There are ${alts.length} methods that could be referenced as the compiler knows too little
1237
+ |about the expected type.
1243
1238
|You may specify the expected type e.g. by
1244
1239
|- assigning it to a value with a specified type, or
1245
- |- adding a type ascription as in `( instance.myMethod: String => Int) `
1246
- | """ .stripMargin
1240
+ |- adding a type ascription as in ` ${ " instance.myMethod: String => Int" } `
1241
+ | """
1247
1242
}
1248
1243
1249
1244
}
0 commit comments