Skip to content

Commit 6d5ef8a

Browse files
nicolasstuckiliufengyun
authored andcommitted
Improve error message
1 parent c7b9326 commit 6d5ef8a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/src/dotty/tools/dotc/typer/FrontEnd.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,13 @@ class FrontEnd extends Phase {
122122
|
123123
| ${suspendedUnits.toList}%, %
124124
|"""
125+
val enableXprintSuspensionHint =
126+
if (ctx.settings.XprintSuspension.value) ""
127+
else "\n\nCompiling with -Xprint-suspension gives more information."
125128
ctx.error(em"""Cyclic macro dependencies $where
126129
|Compilation stopped since no further progress can be made.
127130
|
128-
|To fix this, place macros in one set of files and their callers in another.
129-
|
130-
|Compiling with -Xprint-suspension gives more information.""")
131+
|To fix this, place macros in one set of files and their callers in another.$enableXprintSuspensionHint""")
131132
newUnits
132133
}
133134

0 commit comments

Comments
 (0)