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:
61
61
val line =
62
62
if pos.exists then
63
63
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) "
69
69
70
+ i " $code\t [ $loc ] "
70
71
else
71
72
tree match
72
73
case defDef : DefTree =>
Original file line number Diff line number Diff line change 5
5
|Reading mutable state of other static objects is forbidden as it breaks initialization-time irrelevance. Calling trace:
6
6
|├── object B: [ B.scala:1 ]
7
7
|│ ^
8
- |├── A.scala:2
9
- |├── A.scala:4
8
+ |├── (no source) [ A.scala:2 ]
9
+ |├── (no source) [ A.scala:4 ]
10
10
|├── var y = A.foo(bar) * 2 [ B.scala:2 ]
11
11
|│ ^^^
12
12
|└── def bar = C.n * 3 // warn [ B.scala:4 ]
You can’t perform that action at this time.
0 commit comments