scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
230 stars 21 forks source link

default value ignored in @main #13001

Closed iomedico-beyer closed 1 month ago

iomedico-beyer commented 1 month ago

Reproduction steps

Scala version: 3.4.2

@main def main(mode: String = "foo"): Unit = ???

At runtime:

Illegal command line: more arguments expected

Problem

som-snytt commented 1 month ago

(Is the bug only in Scala 3.x? If so, report it at scala/scala3 instead.)

Please open at scala3.

SethTisue commented 1 month ago

Scala 3 ticket is https://github.com/scala/scala3/issues/20485

@som-snytt one of the benefits of having Scala 3 now at scala/scala3 (instead of lampepfl/dotty) is that we can transfer issues between repos in the same organization. so we could have just transferred this rather than requiring the reporter to open a new ticket. perhaps you have access to transfer issues yourself? if so, feel free to do so when appropriate. if not, feel free to @-mention me to ask for a transfer.

"Transfer issue", if you have access to it, is in the bottom right:

Screenshot 2024-05-28 at 9 55 00 AM
som-snytt commented 1 month ago

@SethTisue thanks, I missed orientation. @iomedico-beyer sorry for the extra work! I totally forgot about the org change obviating the new ticket. And here I thought I was being so Seth.