Skip to content

Commit 0b639c9

Browse files
committed
Unrelated test
1 parent cb42f1e commit 0b639c9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//> using options -Yexplicit-nulls
2+
import annotation.targetName
3+
4+
class A
5+
class B(x: A)
6+
7+
object Test:
8+
def convert(x: A): B = B(x)
9+
@targetName("inlineConvert")
10+
inline def convert(x: A | Null): B | Null =
11+
if x == null then null else convert(x)
12+
13+
val x = convert(A())
14+
val an: A | Null = A()
15+
val y = convert(null)
16+
val z = convert(an)
17+

0 commit comments

Comments
 (0)