Skip to content

Commit f40e55c

Browse files
committed
Add missing file
1 parent 0660800 commit f40e55c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/config/Platform.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ abstract class Platform {
4141
*/
4242
final def hasMainMethod(sym: Symbol, staticOnly: Boolean = false)(implicit ctx: Context): Boolean =
4343
sym.info.member(nme.main).hasAltWith {
44-
case x: SymDenotation => isMainMethod(x)
44+
case x: SymDenotation => isMainMethod(x) && (!staticOnly || x.isStatic)
4545
case _ => false
4646
}
4747
}

0 commit comments

Comments
 (0)