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 {
729
729
try treeChecker.typed(expansion)(using checkingCtx)
730
730
catch
731
731
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
+
732
737
report.error(
733
738
s """ Malformed tree was found while expanding macro with -Xcheck-macros.
734
739
|The tree does not conform to the compiler's tree invariants.
@@ -741,7 +746,7 @@ object TreeChecker {
741
746
|
742
747
|Error:
743
748
| ${err.getMessage}
744
- |
749
+ | $stack
745
750
| """ ,
746
751
original
747
752
)
You can’t perform that action at this time.
0 commit comments