File tree 1 file changed +4
-7
lines changed
compiler/src/dotty/tools/dotc/config 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,10 @@ class JavaPlatform extends Platform {
22
22
23
23
// The given symbol is a method with the right name and signature to be a runnable java program.
24
24
def isMainMethod (sym : SymDenotation )(implicit ctx : Context ): Boolean =
25
- sym.name == nme.main &&
26
- (sym.owner.is(Module ) || sym.owner.isClass && ! sym.owner.is(Trait ) && sym.is(JavaStatic )) && {
27
- sym.info match {
28
- case MethodTpe (_, defn.ArrayOf (el) :: Nil , restpe) => el =:= defn.StringType && (restpe isRef defn.UnitClass )
29
- case _ => false
30
- }
31
- }
25
+ (sym.name == nme.main) && (sym.info match {
26
+ case MethodTpe (_, defn.ArrayOf (el) :: Nil , restpe) => el =:= defn.StringType && (restpe isRef defn.UnitClass )
27
+ case _ => false
28
+ })
32
29
33
30
/** Update classpath with a substituted subentry */
34
31
def updateClassPath (subst : Map [ClassPath , ClassPath ]): Unit = currentClassPath.get match {
You can’t perform that action at this time.
0 commit comments