File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
compiler/src/dotty/tools/dotc/transform/init
tests/init-global/special/tastySource Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,13 @@ object Trace:
6161 val line =
6262 if pos.exists then
6363 val loc = pos.source.file.name + " :" + (pos.line + 1 )
64- if hasSource then
65- val code = SyntaxHighlighting .highlight(pos.lineContent.trim)
66- i " $code \t [ $loc ] "
67- else
68- loc
64+ val code =
65+ if hasSource then
66+ SyntaxHighlighting .highlight(pos.lineContent.trim)
67+ else
68+ " (no source) "
6969
70+ i " $code\t [ $loc ] "
7071 else
7172 tree match
7273 case defDef : DefTree =>
Original file line number Diff line number Diff line change 55 |Reading mutable state of other static objects is forbidden as it breaks initialization-time irrelevance. Calling trace:
66 |├── object B: [ B.scala:1 ]
77 |│ ^
8- |├── A.scala:2
9- |├── A.scala:4
8+ |├── (no source) [ A.scala:2 ]
9+ |├── (no source) [ A.scala:4 ]
1010 |├── var y = A.foo(bar) * 2 [ B.scala:2 ]
1111 |│ ^^^
1212 |└── def bar = C.n * 3 // warn [ B.scala:4 ]
You can’t perform that action at this time.
0 commit comments