Compiler version
Scala 3.10.1-RC1-bin-20260905-8163579-NIGHTLY
Minimized code
//> using scala 3.nightly
//> using platform js
//> using options -Yexplicit-nulls -language:unsafeNulls
// Run with: scala-cli run --server=false --js-version 1.22.0 foo.scala
@main def main(): Unit = println(scala.scalajs.js.Symbol("s").toString())
Output
/tmp/main3109398371773400863.js:1147
throw e;
^
TypeError: Cannot convert a Symbol value to a string
at $c_Lfoo$package$.main__V (/tmp/main3109398371773400863.js:1091:15)
at $s_Lmain__main__AT__V (/tmp/main3109398371773400863.js:1141:24)
at Object.<anonymous> (/tmp/main3109398371773400863.js:2079:1)
at Object.<anonymous> (/tmp/main3109398371773400863.js:2080:4)
at Module._compile (node:internal/modules/cjs/loader:1529:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
at Module.load (node:internal/modules/cjs/loader:1275:32)
at Module._load (node:internal/modules/cjs/loader:1096:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:164:12)
at node:internal/main/run_main_module:28:49
Node.js v20.19.2
Expectation
Same behaviour as without unsafeNulls, where it runs without crashing and prints:
Compiler version
Scala 3.10.1-RC1-bin-20260905-8163579-NIGHTLY
Minimized code
Output
Expectation
Same behaviour as without unsafeNulls, where it runs without crashing and prints: