22 lines
No EOL
350 B
Text
22 lines
No EOL
350 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:Foo {
|
|
result = result + c.a; // c should still be in scope!
|
|
}
|
|
result
|
|
}
|
|
|
|
// @no-errors
|
|
// @eval: Float(1001.0) |