Skip to content

Fix #5163: Properly report tailrec failures on recursive call targeting a supertype #5168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/config/Printers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ object Printers {
val plugins: Printer = noPrinter
val simplify: Printer = noPrinter
val subtyping: Printer = noPrinter
val tailrec: Printer = noPrinter
val transforms: Printer = noPrinter
val typr: Printer = noPrinter
val unapp: Printer = noPrinter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1804,7 +1804,7 @@ object messages {
val symbolKind: String = symbol.showKind
val msg: String =
if (symbol.is(Method))
hl"TailRec optimisation not applicable, $symbol is neither ${"private"} nor ${"final"}."
hl"TailRec optimisation not applicable, method not tail recursive"
else
hl"TailRec optimisation not applicable, ${symbolKind} isn't a method."
val explanation: String =
Expand Down
Loading