You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
caseJavaArrayType(el) =>ArrayBType(typeToTypeKind(el)(ct)(storage)) // Array type such as Array[Int] (kept by erasure)
738
+
caset: TypeRef=>
739
+
t.info match {
740
+
741
+
case _ =>
742
+
if (!t.symbol.isClass) nonClassTypeRefToBType(t.symbol) // See comment on nonClassTypeRefToBType
743
+
else primitiveOrClassToBType(t.symbol) // Common reference to a type such as scala.Int or java.lang.String
744
+
}
745
+
caseTypes.ClassInfo(_, sym, _, _, _) => primitiveOrClassToBType(sym) // We get here, for example, for genLoadModule, which invokes toTypeKind(moduleClassSymbol.info)
746
+
747
+
/* AnnotatedType should (probably) be eliminated by erasure. However we know it happens for
748
+
* meta-annotated annotations (@(ann @getter) val x = 0), so we don't emit a warning.
749
+
* The type in the AnnotationInfo is an AnnotatedTpe. Tested in jvm/annotations.scala.
750
+
*/
751
+
case a @AnnotatedType(t, _) =>
752
+
ctx.debuglog(s"typeKind of annotated type $a")
753
+
typeToTypeKind(t)(ct)(storage)
754
+
755
+
/* ExistentialType should (probably) be eliminated by erasure. We know they get here for
756
+
* classOf constants:
757
+
* class C[T]
758
+
* class T { final val k = classOf[C[_]] }
759
+
*/
760
+
/* case e @ ExistentialType(_, t) =>
761
+
debuglog(s"typeKind of existential type $e")
762
+
t.toTypeKind(ctx)(storage)*/
763
+
764
+
/* The cases below should probably never occur. They are kept for now to avoid introducing
765
+
* new compiler crashes, but we added a warning. The compiler / library bootstrap and the
766
+
* test suite don't produce any warning.
767
+
*/
768
+
769
+
case tp =>
770
+
ctx.warning(
771
+
s"an unexpected type representation reached the compiler backend while compiling ${ctx.compilationUnit}: $tp. "+
772
+
"If possible, please file a bug on https://github.com/lampepfl/dotty/issues")
773
+
774
+
tp match {
775
+
casetp: ThisTypeif tp.cls == defn.ArrayClass=>ObjectReference.asInstanceOf[ct.bTypes.ClassBType] // was introduced in 9b17332f11 to fix SI-999, but this code is not reached in its test, or any other test
caseJavaArrayType(el) =>ArrayBType(typeToTypeKind(el)(ct)(storage)) // Array type such as Array[Int] (kept by erasure)
421
-
caset: TypeRef=>
422
-
t.info match {
423
-
424
-
case _ =>
425
-
if (!t.symbol.isClass) nonClassTypeRefToBType(t.symbol) // See comment on nonClassTypeRefToBType
426
-
else primitiveOrClassToBType(t.symbol) // Common reference to a type such as scala.Int or java.lang.String
427
-
}
428
-
caseTypes.ClassInfo(_, sym, _, _, _) => primitiveOrClassToBType(sym) // We get here, for example, for genLoadModule, which invokes toTypeKind(moduleClassSymbol.info)
429
-
430
-
/* AnnotatedType should (probably) be eliminated by erasure. However we know it happens for
431
-
* meta-annotated annotations (@(ann @getter) val x = 0), so we don't emit a warning.
432
-
* The type in the AnnotationInfo is an AnnotatedTpe. Tested in jvm/annotations.scala.
433
-
*/
434
-
case a @AnnotatedType(t, _) =>
435
-
ctx.debuglog(s"typeKind of annotated type $a")
436
-
typeToTypeKind(t)(ct)(storage)
437
-
438
-
/* ExistentialType should (probably) be eliminated by erasure. We know they get here for
439
-
* classOf constants:
440
-
* class C[T]
441
-
* class T { final val k = classOf[C[_]] }
442
-
*/
443
-
/* case e @ ExistentialType(_, t) =>
444
-
debuglog(s"typeKind of existential type $e")
445
-
t.toTypeKind(ctx)(storage)*/
446
-
447
-
/* The cases below should probably never occur. They are kept for now to avoid introducing
448
-
* new compiler crashes, but we added a warning. The compiler / library bootstrap and the
449
-
* test suite don't produce any warning.
450
-
*/
451
-
452
-
case tp =>
453
-
ctx.warning(
454
-
s"an unexpected type representation reached the compiler backend while compiling ${ctx.compilationUnit}: $tp. "+
455
-
"If possible, please file a bug on https://github.com/lampepfl/dotty/issues")
456
-
457
-
tp match {
458
-
casetp: ThisTypeif tp.cls == defn.ArrayClass=>ObjectReference.asInstanceOf[ct.bTypes.ClassBType] // was introduced in 9b17332f11 to fix SI-999, but this code is not reached in its test, or any other test
0 commit comments