File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -729,6 +729,11 @@ object TreeChecker {
729729 try treeChecker.typed(expansion)(using checkingCtx)
730730 catch
731731 case err : java.lang.AssertionError =>
732+ val stack =
733+ if ! ctx.settings.Ydebug .value then " \n stacktrace available when compiling with `-Ydebug`"
734+ else if err.getStackTrace == null then " no stacktrace"
735+ else err.getStackTrace.nn.mkString(" " , " \n " , " " )
736+
732737 report.error(
733738 s """ Malformed tree was found while expanding macro with -Xcheck-macros.
734739 |The tree does not conform to the compiler's tree invariants.
@@ -741,7 +746,7 @@ object TreeChecker {
741746 |
742747 |Error:
743748 | ${err.getMessage}
744- |
749+ | $stack
745750 | """ ,
746751 original
747752 )
You can’t perform that action at this time.
0 commit comments