Skip to content

Commit fa2bdf8

Browse files
committed
Add tests for nullification of higher kinded types
1 parent f7db386 commit fa2bdf8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/explicit-nulls/flexible-unpickle/Flexible_2.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unsafeNulls.Foo.*
22
import unsafeNulls.Unsafe_1
3-
import unsafeNulls.{A, B, C, F, G, H, I, J, L, M, S, T, U, expects}
3+
import unsafeNulls.{A, B, C, F, G, H, I, J, L, M, N, S, T, U, expects}
44
import scala.reflect.Selectable.reflectiveSelectable
55
import scala.quoted.*
66

@@ -100,6 +100,11 @@ def Flexible_2() =
100100

101101
val m: String = M.test(null)
102102

103+
// i23911
104+
val n1: List[Map[String, Int]] = ???
105+
val n2 = new N[List]()
106+
val n3 = n2.accept[Any](n1)
107+
103108
// i23845
104109
transparent inline def typeName[A]: String = ${typeNameMacro[A]}
105110

@@ -109,3 +114,4 @@ def Flexible_2() =
109114
implicit val givenS: S[A] = ???
110115
expects(alphaTypeNameMacro[A])
111116
}
117+

tests/explicit-nulls/flexible-unpickle/Unsafe_1.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ object M {
7373
def test(input: => String): String = "foo " + input
7474
}
7575

76+
77+
class N[F[_]] {
78+
def accept[A](arg: F[A]): Nothing = ???
79+
}
80+
7681
class S[X]
7782
object S { def show[X] = "dummyStr" }
7883
class T

0 commit comments

Comments
 (0)