diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b87be0675067..bbde24de7f90 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,7 @@ jobs: container: lampepfl/dotty:2020-04-24 steps: - - name: Set up JDK version + - name: Set JDK 11 as default run: echo "::add-path::/usr/lib/jvm/java-11-openjdk-amd64/bin" - name: Checkout cleanup script @@ -58,7 +58,7 @@ jobs: container: lampepfl/dotty:2020-04-24 steps: - - name: Set up JDK version + - name: Set JDK 11 as default run: echo "::add-path::/usr/lib/jvm/java-11-openjdk-amd64/bin" - name: Checkout cleanup script @@ -190,6 +190,9 @@ jobs: github.event_name == 'schedule' steps: + - name: Set JDK 8 as default + run: echo "::add-path::/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin" + - name: Checkout cleanup script uses: actions/checkout@v2 @@ -221,9 +224,7 @@ jobs: restore-keys: ${{ runner.os }}-general- - name: Test - run: | - export PATH="/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin:$PATH" - ./project/scripts/sbt ";compile ;test" + run: ./project/scripts/sbt ";compile ;test" publish_nightly: runs-on: self-hosted diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index 15da9c4fcb9f..f983743281cc 100644 --- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -131,7 +131,14 @@ object DottyBackendInterface { def isStaticConstructor(using Context): Boolean = (sym.isStaticMember && sym.isClassConstructor) || (sym.name eq nme.STATIC_CONSTRUCTOR) - /** Fields of static modules will be static at backend */ + /** Fields of static modules will be static at backend + * + * Note that lazy val encoding assumes bitmap fields are non-static. + * See also `genPlainClass` in `BCodeSkelBuilder.scala`. + * + * TODO: remove the special handing of `LazyBitMapName` once we swtich to + * the new lazy val encoding: https://github.com/lampepfl/dotty/issues/7140 + */ def isStaticModuleField(using Context): Boolean = sym.owner.isStaticModuleClass && sym.isField && !sym.name.is(LazyBitMapName) diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index bcd1a0661da8..0aa3b65437fa 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -830,9 +830,9 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] => /** Return a pair consisting of (supercall, rest) * - * - supercall: the of superclass call, excluding trait constr calls + * - supercall: the superclass call, excluding trait constr calls * - * The supercall is always the first statement (if exists) + * The supercall is always the first statement (if it exists) */ final def splitAtSuper(constrStats: List[Tree])(implicit ctx: Context): (List[Tree], List[Tree]) = constrStats.toList match {