[fine] fix some bugs, semantics for is
This commit is contained in:
parent
ba5b37f5ff
commit
b5b56b49a9
4 changed files with 59 additions and 7 deletions
18
fine/tests/expression/is.fine
Normal file
18
fine/tests/expression/is.fine
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
class Foo {
|
||||
a: f64;
|
||||
}
|
||||
|
||||
fun test() -> f64 {
|
||||
let b = new Foo { a : 23 };
|
||||
|
||||
let result = 0;
|
||||
if b is c:Foo and c.a == 23 {
|
||||
result = result + 1;
|
||||
}
|
||||
if b is c:Foo and c.a == 24 {
|
||||
result = result + 1;
|
||||
}
|
||||
result
|
||||
}
|
||||
|
||||
// @no-errors
|
||||
Loading…
Add table
Add a link
Reference in a new issue