Skip to content

Commit 218656c

Browse files
committed
Fix-#4867 provide positive test for fix
1 parent c70558e commit 218656c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/pos/i4867.scala

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
object Main_i4867 {
2+
3+
given extension [AB](ab: AB) {
4+
def id: AB = ab
5+
}
6+
7+
def main(args : Array[String]) : Unit = {
8+
val int : Int = 2
9+
val foundInt : Int = int.id
10+
11+
val stringOrInt : String | Int = 1
12+
val foundAny : String | Int = stringOrInt.id
13+
}
14+
15+
}

0 commit comments

Comments
 (0)