Skip to content

Commit

Permalink
Merge pull request #14802 from ckipp01/explainReturnType
Browse files Browse the repository at this point in the history
fix: correct highlight interpolation in explain message
  • Loading branch information
ckipp01 authored Mar 29, 2022
2 parents ed9267e + b8c9d5a commit 7208bd8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/src/dotty/tools/dotc/reporting/messages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7208bd8

Please sign in to comment.