Add on more example illustrating if/is issue.

This commit is contained in:
KtorZ
2024-07-27 09:27:38 +02:00
committed by Kasey
parent a6c5dbb5ad
commit 9ea54afd12

View File

@@ -60,3 +60,20 @@ test soft_casting_6() {
True
}
}
type A {
A(Bool)
}
type B {
B(Int)
}
test soft_casting_7() {
let data: Data = A(True)
if data is B(_): B {
False
} else {
True
}
}