We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0660800 commit f40e55cCopy full SHA for f40e55c
compiler/src/dotty/tools/dotc/config/Platform.scala
@@ -41,7 +41,7 @@ abstract class Platform {
41
*/
42
final def hasMainMethod(sym: Symbol, staticOnly: Boolean = false)(implicit ctx: Context): Boolean =
43
sym.info.member(nme.main).hasAltWith {
44
- case x: SymDenotation => isMainMethod(x)
+ case x: SymDenotation => isMainMethod(x) && (!staticOnly || x.isStatic)
45
case _ => false
46
}
47
0 commit comments