Compiler version
3.3.7 (LTS), 3.7.3, 3.8.0-RC1-bin-20251011-be16a7b-NIGHTLY
Minimized code
Rec.java
:
public record Rec(int... xs) {}
main.scala
:
@main def main() =
val r = Rec(1)
val xs = r.xs()
Output
Separate compilation (success):
javac Rec.java && scala-cli compile main.scala --classpath=. --server=false
Joint compilation (error)
scala-cli compile main.scala Rec.java --server=false
:
3 | val xs = r.xs()
| ^
| Cannot return repeated parameter type Int*
1 error found
Compilation failed
Expectation
Both should compile successfully.