You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect warning when object contains multiple main methods #6896
When an object contains multiple methods named main, including one with a valid type signature for the "true" main method, the compiler issues a warning indicating that the object contains no such method.
scalac mains.scala
mains.scala:1:warning: TooManyMains has a main method with parameter typeArray[String], but TooManyMains will not be a runnable program.
Reason: main method must have exact signature (Array[String])UnitobjectTooManyMains {
^
one warning found
Activity
scabug commentedon Dec 30, 2012
Imported From: https://issues.scala-lang.org/browse/SI-6896?orig=1
Reporter: @eengbrec
Affected Versions: 2.10.0-RC5
Attachments:
scabug commentedon Dec 31, 2012
@paulp said:
scala/scala#1835
scabug commentedon Jun 6, 2013
@retronym said:
This was merged in 2.10.1