Skip to content

Commit 8e69861

Browse files
committed
Print TypeError stacktraces on -Ydebug-error or -Ydebug-type-error
1 parent c325428 commit 8e69861

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/core/TypeErrors.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ abstract class TypeError(using creationContext: Context) extends Exception(""):
2222
* This is expensive and only useful for debugging purposes.
2323
*/
2424
def computeStackTrace: Boolean =
25-
ctx.debug || (cyclicErrors != noPrinter && this.isInstanceOf[CyclicReference] && !(ctx.mode is Mode.CheckCyclic))
25+
ctx.debug
26+
|| (cyclicErrors != noPrinter && this.isInstanceOf[CyclicReference] && !(ctx.mode is Mode.CheckCyclic))
27+
|| ctx.settings.YdebugTypeError.value
28+
|| ctx.settings.YdebugError.value
2629

2730
override def fillInStackTrace(): Throwable =
2831
if computeStackTrace then super.fillInStackTrace().nn

0 commit comments

Comments
 (0)