Open
Description
Problematic tests
tests/init-global/neg/patmat.scala
tests/init-global/neg/t9312.scala
tests/init-global/neg/unapplySeq-implicit-arg.scala
tests/init-global/neg/unapplySeq-implicit-arg2.scala
tests/init-global/neg/unapplySeq-implicit-arg3.scala
Reproduction 1
sbt> set ThisBuild/Build.useScala2LibraryTasty := true
sbt> scala3-bootstrapped/testCompilation tests/init-global/neg/t9312.scala
Reproduction 2
Without library TASTy
sbt> set ThisBuild/Build.useScala2LibraryTasty := false
sbt> scala3-bootstrapped/scalac -Ysafe-init-global tests/init-global/neg/t9312.scala
-- Warning: tests/init-global/neg/t9312.scala:18:11 ----------------------------
18 | object Child1 extends Child // error
| ^
|Cyclic initialization: object Child1 -> object Parent -> object Child1. Calling trace:
|-> object Child1 extends Child // error [ t9312.scala:18 ]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|-> trait Child { [ t9312.scala:12 ]
| ^
|-> val parent = Parent [ t9312.scala:14 ]
| ^^^^^^
|-> object Parent { // error [ t9312.scala:11 ]
| ^
|-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
| ^^^^^^
-- Warning: tests/init-global/neg/t9312.scala:11:9 -----------------------------
11 | object Parent { // error
| ^
|Cyclic initialization: object Parent -> object Child2 -> object Parent. Calling trace:
|-> object Parent { // error [ t9312.scala:11 ]
| ^
|-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
| ^^^^^^
|-> object Child2 extends Child [ t9312.scala:19 ]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|-> trait Child { [ t9312.scala:12 ]
| ^
|-> val parent = Parent [ t9312.scala:14 ]
| ^^^^^^
2 warnings found
With library TASTy
sbt> set ThisBuild/Build.useScala2LibraryTasty := true
sbt> scala3-bootstrapped/scalac -Ysafe-init-global tests/init-global/neg/t9312.scala
-- Warning: tests/init-global/neg/t9312.scala:18:11 ----------------------------
18 | object Child1 extends Child // error
| ^
|Cyclic initialization: object Child1 -> object Parent -> object Child1. Calling trace:
|-> object Child1 extends Child // error [ t9312.scala:18 ]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|-> trait Child { [ t9312.scala:12 ]
| ^
|-> val parent = Parent [ t9312.scala:14 ]
| ^^^^^^
|-> object Parent { // error [ t9312.scala:11 ]
| ^
|-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
| ^^^^^^
-- Warning: tests/init-global/neg/t9312.scala:11:9 -----------------------------
11 | object Parent { // error
| ^
|Cyclic initialization: object Parent -> object Child2 -> object Parent. Calling trace:
|-> object Parent { // error [ t9312.scala:11 ]
| ^
|-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
| ^^^^^^
|-> object Child2 extends Child [ t9312.scala:19 ]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|-> trait Child { [ t9312.scala:12 ]
| ^
|-> val parent = Parent [ t9312.scala:14 ]
| ^^^^^^
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
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.clone()
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)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating a field before its initialization: variable mutationCount. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.mutationCount = ArrayBuffer.this.mutationCount.+(1)
Mutating a field before its initialization: variable size0. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.size0 = ArrayBuffer.this.length.+(elemsLength)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating a field before its initialization: variable mutationCount. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.mutationCount = ArrayBuffer.this.mutationCount.+(1)
Mutating a field before its initialization: variable size0. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.size0 = ArrayBuffer.this.length.+(elemsLength)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
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.clone()
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.clone()
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)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating a field before its initialization: variable mutationCount. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.mutationCount = ArrayBuffer.this.mutationCount.+(1)
Mutating a field before its initialization: variable size0. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.size0 = ArrayBuffer.this.length.+(elemsLength)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
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.clone()
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.clone()
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.clone()
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)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating a field before its initialization: variable mutationCount. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.mutationCount = ArrayBuffer.this.mutationCount.+(1)
Mutating a field before its initialization: variable size0. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.size0 = ArrayBuffer.this.length.+(elemsLength)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
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.clone()
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)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
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.clone()
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.clone()
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)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
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.clone()
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.clone()
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.clone()
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)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
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.clone()
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)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
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.clone()
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.clone()
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)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
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.clone()
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.clone()
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.clone()
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)
Reading mutable state of object ArrayBuffer 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 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.apply(n)
Mutating object ArrayBuffer during initialization of object Parent.
Mutating other static objects during the initialization of one static object is forbidden. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> ArrayBuffer.this.array.update(index, elem.asInstanceOf[AnyRef])
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.appended[A](element)
Mutating a field before its initialization: variable content. Calling trace:
-> object Parent { // error [ t9312.scala:11 ]
^
-> final val children = Set(Child1, Child2) [ t9312.scala:21 ]
^^^^^^^^^^^^^^^^^^^
-> hc.content = hc.content.updated[A](index, element)
86 warnings found
Question
What trigers the extra warnings? It is possible that the TASTy has some inconsitent information. It is also possible that the TASTy has more information, for example, now we know which classes have a pure constuctor.