You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure that trace is shown correctly in the presence of invalid line numbers (#18930)
Make sure that trace is shown correctly in the presence of invalid line
numbers (-1) in TASTy.
Before:
```Scala
Reading mutable state of object Array during initialization of object Parent.
Reading mutable state of other static objects is forbidden as it breaks initialization-time irrelevance. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> BitmapIndexedSetNode.this.originalHashes.apply(index)
```
After:
```Scala
Reading mutable state of object Array during initialization of object Parent.
Reading mutable state of other static objects is forbidden as it breaks initialization-time irrelevance. Calling trace:
├── object Parent { // error [ t9312.scala:11 ]
│ ^
├── final val children = Set(Child1, Child2) [ t9312.scala:21 ]
│ ^^^^^^^^^^^^^^^^^^^
├── scala.collection.IterableFactory.apply
├── IterableFactory.this.from[A](elems)
├── scala.collection.immutable.Set.from
├── scala.collection.immutable.Set.newBuilder[E].addAll(it)
├── scala.collection.immutable.SetBuilderImpl.addAll
├── super.addAll(xs)
├── scala.collection.mutable.Growable.addAll
├── Growable.this.addOne(it.next())
├── scala.collection.immutable.SetBuilderImpl.addOne
├── SetBuilderImpl.this.hashSetBuilder.addOne(elem)
├── scala.collection.immutable.HashSetBuilder.addOne
├── HashSetBuilder.this.update(HashSetBuilder.this.rootNode, elem, h, im, 0)
├── scala.collection.immutable.HashSetBuilder.update
├── bm.getHash(index)
├── scala.collection.immutable.BitmapIndexedSetNode.getHash
└── BitmapIndexedSetNode.this.originalHashes.apply(index)
```
Ref: #18882
Copy file name to clipboardExpand all lines: tests/init/neg/closureLeak.check
+6-6
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
11 | l.foreach(a => a.addX(this)) // error
3
3
| ^^^^^^^^^^^^^^^^^
4
4
|Could not verify that the method argument is transitively initialized (Hot). It was found to be a function where "this" is (the original object of type (class Outer) where initialization checking started). Only transitively initialized arguments may be passed to methods (except constructors). Calling trace:
|Promoting the value to transitively initialized (Hot) failed due to the following problem:
11
11
|Could not verify that the method argument is transitively initialized (Hot). It was found to be the original object of type (class Outer) where initialization checking started. Only transitively initialized arguments may be passed to methods (except constructors).
12
12
|Non initialized field(s): value p. Promotion trace:
Copy file name to clipboardExpand all lines: tests/init/neg/default-this.check
+8-8
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@
3
3
| ^^^^^^^
4
4
|Could not verify that the method argument is transitively initialized (Hot). It was found to be the original object of type (class B) where initialization checking started. Only transitively initialized arguments may be passed to methods (except constructors).
5
5
|Non initialized field(s): value result. Calling trace:
6
-
|-> class B extends A { [ default-this.scala:6 ]
7
-
| ^
8
-
|-> val result = updateThenCompare(5) [ default-this.scala:11 ]
Copy file name to clipboardExpand all lines: tests/init/neg/i15459.check
+6-6
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@
3
3
| ^^^^
4
4
|Could not verify that the method argument is transitively initialized (Hot). It was found to be the original object of type (class Sub) where initialization checking started. Only transitively initialized arguments may be passed to methods (except constructors).
5
5
|Non initialized field(s): value b. Calling trace:
0 commit comments