@@ -1194,7 +1194,6 @@ object messages {
1194
1194
extends Message (SuperQualMustBeParentID ) {
1195
1195
1196
1196
val msg = hl """ | $qual does not name a parent of $cls"""
1197
-
1198
1197
val kind = " Reference"
1199
1198
1200
1199
private val parents : Seq [String ] = (cls.info.parents map (_.name.show)).sorted
@@ -1209,15 +1208,13 @@ object messages {
1209
1208
}
1210
1209
1211
1210
case class VarArgsParamMustComeLast ()(implicit ctx : Context )
1212
- extends Message (IncorrectRepeatedParameterSyntaxID ) {
1213
- override def msg : String = " varargs parameter must come last"
1214
-
1215
- override def kind : String = " Syntax"
1216
-
1217
- override def explanation : String =
1211
+ extends Message (IncorrectRepeatedParameterSyntaxID ) {
1212
+ val msg = " varargs parameter must come last"
1213
+ val kind = " Syntax"
1214
+ val explanation =
1218
1215
hl """ |The varargs field must be the last field in the method signature.
1219
1216
|Attempting to define a field in a method signature after a varargs field is an error.
1220
- | """ .stripMargin
1217
+ | """
1221
1218
}
1222
1219
1223
1220
case class AmbiguousImport (name : Names .Name , newPrec : Int , prevPrec : Int , prevCtx : Context )(implicit ctx : Context )
@@ -1259,20 +1256,18 @@ object messages {
1259
1256
implicit ctx : Context )
1260
1257
extends Message (AmbiguousOverloadID ) {
1261
1258
1262
- private def all = if (alts.length == 2 ) " both" else " all"
1263
-
1264
- override def msg : String =
1259
+ private val all = if (alts.length == 2 ) " both" else " all"
1260
+ val msg =
1265
1261
s """ |Ambiguous overload. The ${err.overloadedAltsStr(alts)}
1266
1262
| $all match ${err.expectedTypeStr(pt)}""" .stripMargin
1267
-
1268
- override def kind : String = " Reference"
1269
-
1270
- override def explanation : String =
1271
- s """ |There are ${alts.length} methods that could be referenced as the compiler knows too little about the expected type.
1263
+ val kind = " Reference"
1264
+ val explanation =
1265
+ hl """ |There are ${alts.length} methods that could be referenced as the compiler knows too little
1266
+ |about the expected type.
1272
1267
|You may specify the expected type e.g. by
1273
1268
|- assigning it to a value with a specified type, or
1274
- |- adding a type ascription as in `( instance.myMethod: String => Int) `
1275
- | """ .stripMargin
1269
+ |- adding a type ascription as in ` ${ " instance.myMethod: String => Int" } `
1270
+ | """
1276
1271
}
1277
1272
1278
1273
}
0 commit comments