File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
compiler/src/dotty/tools/dotc/reporting Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -3671,11 +3671,15 @@ extends Message(ConcreteClassHasUnimplementedMethodsID):
3671
3671
})
3672
3672
}
3673
3673
3674
- def msg (using Context ) =
3675
- s """ $clazz needs to be abstract, since it has ${missingMethods.size} unimplemented members.
3676
- |
3677
- | ${renderMissingMethods.mkString(" \n " )}
3678
- | """ .stripMargin
3674
+ def msg (using Context ) = missingMethods match
3675
+ case single :: Nil =>
3676
+ def showDclAndLocation (sym : Symbol ) = s " ${sym.showDcl} in ${sym.owner.showLocated}"
3677
+ s " $clazz needs to be abstract, since ${showDclAndLocation(single)} is not defined "
3678
+ case _ =>
3679
+ s """ $clazz needs to be abstract, since it has ${missingMethods.size} unimplemented members.
3680
+ |
3681
+ | ${renderMissingMethods.mkString(" \n " )}
3682
+ | """ .stripMargin
3679
3683
3680
3684
def explain (using Context ) = " "
3681
3685
override def actions (using Context ) = this .actions
You can’t perform that action at this time.
0 commit comments