diff --git a/compiler/src/dotty/tools/dotc/reporting/messages.scala b/compiler/src/dotty/tools/dotc/reporting/messages.scala index e1f05cbdb8a9..8e494ab3b40d 100644 --- a/compiler/src/dotty/tools/dotc/reporting/messages.scala +++ b/compiler/src/dotty/tools/dotc/reporting/messages.scala @@ -589,9 +589,8 @@ import transform.SymUtils._ def explain = em"""|An abstract declaration must have a return type. For example: | - |trait Shape {hl( - | def area: Double // abstract declaration returning a ${"Double"} - |)}""" + |trait Shape: + | ${hl("def area: Double")} // abstract declaration returning a Double""" } class MissingReturnTypeWithReturnStatement(method: Symbol)(using Context)