scala3
scala3 copied to clipboard
Main Annotation desugaring uses deprecated array conversion
Compiler version
3.2.0-RC1
Minimized code
import scala.annotation.experimental
import scala.annotation.newMain
@experimental @newMain def newHello = println("Hello, World!")
Output
Warning: there was 1 deprecation warning; re-run with -deprecation for details
With -deprecation
[warn] foo.scala:13:15: method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated since 2.13.0: Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
[warn] @experimental @newMain def newHello = println("Hello, World!")
[warn]
Expectation
No warning - use the correct conversion, possibly ArraySeq.unsafeWrapArray