File tree 4 files changed +7
-2
lines changed 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2731,6 +2731,8 @@ class JSCodeGen()(implicit ctx: Context) {
2731
2731
2732
2732
if (sym == defn.BoxedUnit_UNIT ) {
2733
2733
js.Undefined ()
2734
+ } else if (sym == defn.BoxedUnit_TYPE ) {
2735
+ js.ClassOf (jstpe.ClassRef (" V" ))
2734
2736
} else {
2735
2737
val inst = genLoadModule(sym.owner)
2736
2738
val method = encodeStaticMemberSym(sym)
Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ object JSPrimitives {
24
24
final val JS_NATIVE = TYPEOF + 1 // js.native. Marker method. Fails if tried to be emitted.
25
25
26
26
final val UNITVAL = JS_NATIVE + 1 // () value, which is undefined
27
+ final val UNITTYPE = UNITVAL + 1 // () type
27
28
28
- final val CONSTRUCTOROF = UNITVAL + 1 // runtime.constructorOf(clazz)
29
+ final val CONSTRUCTOROF = UNITTYPE + 1 // runtime.constructorOf(clazz)
29
30
final val CREATE_INNER_JS_CLASS = CONSTRUCTOROF + 1 // runtime.createInnerJSClass
30
31
final val CREATE_LOCAL_JS_CLASS = CREATE_INNER_JS_CLASS + 1 // runtime.createLocalJSClass
31
32
final val WITH_CONTEXTUAL_JS_CLASS_VALUE = CREATE_LOCAL_JS_CLASS + 1 // runtime.withContextualJSClassValue
@@ -93,6 +94,7 @@ class JSPrimitives(ctx: Context) extends DottyPrimitives(ctx) {
93
94
addPrimitive(jsdefn.JSPackage_native , JS_NATIVE )
94
95
95
96
addPrimitive(defn.BoxedUnit_UNIT , UNITVAL )
97
+ addPrimitive(defn.BoxedUnit_TYPE , UNITTYPE )
96
98
97
99
addPrimitive(jsdefn.Runtime_constructorOf , CONSTRUCTOROF )
98
100
/* addPrimitive(jsdefn.Runtime_createInnerJSClass, CREATE_INNER_JS_CLASS)
Original file line number Diff line number Diff line change @@ -466,6 +466,7 @@ class Definitions {
466
466
467
467
@ tu lazy val BoxedUnitClass : ClassSymbol = ctx.requiredClass(" scala.runtime.BoxedUnit" )
468
468
def BoxedUnit_UNIT (given Context ): TermSymbol = BoxedUnitClass .linkedClass.requiredValue(" UNIT" )
469
+ def BoxedUnit_TYPE (given Context ): TermSymbol = BoxedUnitClass .linkedClass.requiredValue(" TYPE" )
469
470
470
471
@ tu lazy val BoxedBooleanClass : ClassSymbol = ctx.requiredClass(" java.lang.Boolean" )
471
472
@ tu lazy val BoxedByteClass : ClassSymbol = ctx.requiredClass(" java.lang.Byte" )
Original file line number Diff line number Diff line change @@ -978,7 +978,7 @@ object Build {
978
978
val dir = fetchScalaJSSource.value / " test-suite"
979
979
(
980
980
(dir / " shared/src/test/scala/org/scalajs/testsuite/compiler" ** ((" *.scala" : FileFilter ) -- " RegressionTest.scala" -- " ReflectiveCallTest.scala" )).get
981
- ++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/lang" ** ((" *.scala" : FileFilter ) -- " ClassTest.scala " -- " StringTest.scala" )).get
981
+ ++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/lang" ** ((" *.scala" : FileFilter ) -- " StringTest.scala" )).get
982
982
++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/io" ** ((" *.scala" : FileFilter ) -- " ByteArrayInputStreamTest.scala" -- " ByteArrayOutputStreamTest.scala" -- " DataInputStreamTest.scala" -- " DataOutputStreamTest.scala" -- " InputStreamTest.scala" -- " OutputStreamWriterTest.scala" -- " PrintStreamTest.scala" -- " ReadersTest.scala" -- " CommonStreamsTests.scala" )).get
983
983
++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/math" ** " *.scala" ).get
984
984
++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/net" ** ((" *.scala" : FileFilter ) -- " URITest.scala" )).get
You can’t perform that action at this time.
0 commit comments