Skip to content

Commit f0028b2

Browse files
authored
Merge branch 'main' into explicit-nulls-stdlib
2 parents 4678e50 + 3b20e4b commit f0028b2

33 files changed

+313
-213
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
104104
- name: Scala.js Test
105105
run: |
106-
./project/scripts/sbt ";sjsSandbox/run ;sjsSandbox/test ;sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test ;sjsCompilerTests/test"
106+
./project/scripts/sbt ";sjsSandbox/run ;sjsSandbox/test ;sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test"
107107
108108
test_windows_fast:
109109
runs-on: [self-hosted, Windows]
@@ -149,7 +149,7 @@ jobs:
149149
shell: cmd
150150

151151
- name: Scala.js Test
152-
run: sbt ";sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test ;sjsCompilerTests/test"
152+
run: sbt ";sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test"
153153
shell: cmd
154154

155155
test_windows_full:

.github/workflows/stdlib.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,33 @@ jobs:
392392
- name: Report MiMa issues in `tasty-core-bootstrapped`
393393
run: ./project/scripts/sbt tasty-core-bootstrapped-new/mimaReportBinaryIssues
394394

395+
mima-scala-library-sjs:
396+
runs-on: ubuntu-latest
397+
needs: scala-library-sjs
398+
steps:
399+
- name: Git Checkout
400+
uses: actions/checkout@v5
401+
402+
- name: Set up JDK 17
403+
uses: actions/setup-java@v5
404+
with:
405+
distribution: 'temurin'
406+
java-version: 17
407+
cache: 'sbt'
408+
409+
- uses: sbt/setup-sbt@v1
410+
- name: Report MiMa issues in `scala-library-sjs`
411+
run: ./project/scripts/sbt scala-library-sjs/mimaReportBinaryIssues
412+
395413
#################################################################################################
396414
########################################### TEST JOBS ###########################################
397415
#################################################################################################
398416

399417
test-scala3-compiler-nonbootstrapped:
400418
runs-on: ubuntu-latest
401419
needs: [scala3-compiler-nonbootstrapped, tasty-core-nonbootstrapped, scala-library-nonbootstrapped]
420+
# Non-bootstrapped can definetely not be enabled until we have at least 3.8.0-RC1 as a reference compiler
421+
if: false
402422
steps:
403423
- name: Git Checkout
404424
uses: actions/checkout@v5
@@ -497,3 +517,20 @@ jobs:
497517
- uses: sbt/setup-sbt@v1
498518
- name: Test `tasty-core-bootstrapped`
499519
run: ./project/scripts/sbt tasty-core-bootstrapped-new/test
520+
521+
test-scala-js:
522+
runs-on: ubuntu-latest
523+
needs: [scala3-compiler-bootstrapped, tasty-core-bootstrapped, scala3-staging, scala3-tasty-inspector, scala-library-sjs]
524+
steps:
525+
- name: Git Checkout
526+
uses: actions/checkout@v5
527+
528+
- name: Set up JDK 17
529+
uses: actions/setup-java@v5
530+
with:
531+
distribution: 'temurin'
532+
java-version: 17
533+
cache: 'sbt'
534+
- uses: sbt/setup-sbt@v1
535+
- name: Test Scala.js
536+
run: ./project/scripts/sbt sjsCompilerTests/test

compiler/src/dotty/tools/dotc/core/TypeErasure.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ object SourceLanguage:
3232
SourceLanguage.Java
3333
// Scala 2 methods don't have Inline set, except for the ones injected with `patchStdlibClass`
3434
// which are really Scala 3 methods.
35-
else if denot.isClass && denot.is(Scala2x) || (denot.maybeOwner.lastKnownDenotation.is(Scala2x) && !denot.is(Inline)) then
35+
else if denot.isClass && denot.is(Scala2x)
36+
|| (denot.maybeOwner.lastKnownDenotation.is(Scala2x) && !denot.is(Inline))
37+
|| denot.is(Param) && denot.maybeOwner.is(Method) && denot.maybeOwner.maybeOwner.lastKnownDenotation.is(Scala2x) then
3638
SourceLanguage.Scala2
3739
else
3840
SourceLanguage.Scala3

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,14 +717,12 @@ object SpaceEngine {
717717

718718
extension (tp: Type)
719719
def isDecomposableToChildren(using Context): Boolean =
720-
val sym = tp.typeSymbol // e.g. Foo[List[Int]] = type Foo (i19275)
721720
val cls = tp.classSymbol // e.g. Foo[List[Int]] = class List
722721
tp.hasSimpleKind // can't decompose higher-kinded types
723722
&& cls.is(Sealed)
724723
&& cls.isOneOf(AbstractOrTrait) // ignore sealed non-abstract classes
725724
&& !cls.hasAnonymousChild // can't name anonymous classes as counter-examples
726725
&& cls.children.nonEmpty // can't decompose without children
727-
&& !sym.isOpaqueAlias // can't instantiate subclasses to conform to an opaque type (i19275)
728726

729727
val ListOfNoType = List(NoType)
730728
val ListOfTypNoType = ListOfNoType.map(Typ(_, decomposed = true))

compiler/test/dotty/Properties.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ object Properties {
5757
/** dotty-interfaces jar */
5858
def dottyInterfaces: String = sys.props("dotty.tests.classes.dottyInterfaces")
5959

60-
/** dotty-library-js jar */
61-
def dottyLibraryJS: String = sys.props("dotty.tests.classes.dottyLibraryJS")
62-
6360
/** dotty-compiler jar */
6461
def dottyCompiler: String = sys.props("dotty.tests.classes.dottyCompiler")
6562

compiler/test/dotty/tools/vulpix/TestConfiguration.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ object TestConfiguration {
4848
Properties.scalaJSJavalib,
4949
Properties.scalaJSScalalib,
5050
Properties.scalaJSLibrary,
51-
Properties.dottyLibraryJS
5251
))
5352

5453
def mkClasspath(classpaths: List[String]): String =

library-js/src/scala/App.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala
1414

15+
import scala.language.`2.13`
16+
1517
import java.lang.System.{currentTimeMillis => currentTime}
1618
import scala.collection.mutable.ListBuffer
1719

library-js/src/scala/Array.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala
1414

15+
import scala.language.`2.13`
16+
1517
import language.experimental.captureChecking
1618

1719
//import scala.collection.generic._

library-js/src/scala/Console.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala
1414

15+
import scala.language.`2.13`
16+
1517
import java.io.{ BufferedReader, InputStream, InputStreamReader, OutputStream, PrintStream, Reader }
1618
import scala.io.AnsiColor
1719
import scala.util.DynamicVariable

library-js/src/scala/Enumeration.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala
1414

15+
import scala.language.`2.13`
16+
1517
import scala.collection.{SpecificIterableFactory, StrictOptimizedIterableOps, View, immutable, mutable}
1618
import java.lang.reflect.{Field => JField, Method => JMethod}
1719

0 commit comments

Comments
 (0)