Skip to content

Commit 7d6466a

Browse files
committed
Fix #6972: Parially revert c53f465
1 parent 8b4509d commit 7d6466a

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

.drone.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ steps:
5959
commands:
6060
- cp -R . /tmp/4/ && cd /tmp/4/
6161
- ./project/scripts/sbt sbt-dotty/scripted
62-
when:
63-
event:
64-
- tag
65-
- promote
62+
# when:
63+
# event:
64+
# - tag
65+
# - promote
6666

6767
- name: test_java11
6868
pull: default

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ class JavaPlatform extends Platform {
2222

2323
// The given symbol is a method with the right name and signature to be a runnable java program.
2424
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+
})
3229

3330
/** Update classpath with a substituted subentry */
3431
def updateClassPath(subst: Map[ClassPath, ClassPath]): Unit = currentClassPath.get match {

0 commit comments

Comments
 (0)