25 lines
No EOL
432 B
Text
25 lines
No EOL
432 B
Text
class Foo {
|
|
a: f64;
|
|
}
|
|
|
|
fun test() -> f64 {
|
|
let b = new Foo { a : 1000 };
|
|
|
|
let result = 0;
|
|
if b is c:Foo and c.a == 1000 {
|
|
result = result + 1;
|
|
}
|
|
if b is c:Foo and c.a == 24 {
|
|
result = result + 10;
|
|
}
|
|
if b is c:_ {
|
|
result = result + 100; // underscore should always match!
|
|
}
|
|
if b is c:Foo {
|
|
result = result + c.a; // c should still be in scope!
|
|
}
|
|
result
|
|
}
|
|
|
|
// @no-errors
|
|
// @eval: Float(1101.0) |