File tree 2 files changed +12
-3
lines changed
compiler/src/dotty/tools/backend/sjs 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -410,8 +410,17 @@ object JSEncoding {
410
410
paramAndResultTypeNames.mkString(SignatureSep , SignatureSep , " " )
411
411
412
412
/** Computes the internal name for a type. */
413
- private def internalName (tpe : Type )(implicit ctx : Context ): String =
414
- encodeTypeRef(toTypeRef(tpe))
413
+ private def internalName (tpe : Type )(implicit ctx : Context ): String = {
414
+ val typeRef = toTypeRef(tpe)
415
+
416
+ val safeTypeRef : jstpe.TypeRef = typeRef match {
417
+ case jstpe.ClassRef (" s_Null" ) => jstpe.ClassRef (ir.Definitions .NullClass )
418
+ case jstpe.ClassRef (" s_Nothing" ) => jstpe.ClassRef (ir.Definitions .NothingClass )
419
+ case otherTypeRef => otherTypeRef
420
+ }
421
+
422
+ encodeTypeRef(safeTypeRef)
423
+ }
415
424
416
425
/** Encodes a [[Types.TypeRef ]], such as in an encoded method signature.
417
426
*/
Original file line number Diff line number Diff line change @@ -960,7 +960,7 @@ object Build {
960
960
++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/lang" ** ((" *.scala" : FileFilter ) -- " StringTest.scala" )).get
961
961
++ (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" -- " CommonStreamsTests.scala" )).get
962
962
++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/math" ** " *.scala" ).get
963
- ++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/net" ** (( " *.scala" : FileFilter ) -- " URITest.scala " ) ).get
963
+ ++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/net" ** " *.scala" ).get
964
964
++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/security" ** " *.scala" ).get
965
965
++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/util/regex" ** " *.scala" ).get
966
966
++ (dir / " shared/src/test/scala/org/scalajs/testsuite/javalib/util/concurrent" ** ((" *.scala" : FileFilter ) -- " ConcurrentHashMapTest.scala" -- " ConcurrentLinkedQueueTest.scala" -- " ConcurrentMapTest.scala" -- " ConcurrentSkipListSetTest.scala" -- " CopyOnWriteArrayListTest.scala" )).get
You can’t perform that action at this time.
0 commit comments