-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem running @main
methods with command line arguments
#14541
Comments
Similarly, for this file // In file repeatword.scala
@main def repeat(word: String, count: Int) =
println(List.fill(count)(word).mkString(" ")) OutputFirst compile
Then run the main method:
However:
Expectation
|
PR is quick tweak. Key phrase from last summer: "MainGenericRunner should work almost ". If we can go 6 months without using command line args, then maybe we don't need command line args. |
Crossword just had clue "hello hello hello, e.g." for "echo". |
The book told me to do it! (Prog in Scala 5th ed) It's used to show the power of type classes:
|
the |
Compiler version
3.1.1
Minimized code
Output
First compile
Then run the main method:
Expectation
Edit: this was the output using the
scala
command of 3.0.2The text was updated successfully, but these errors were encountered: