[fine] Implement the wildcard pattern
This commit is contained in:
parent
e0721d09fc
commit
65ec2d4cca
5 changed files with 104 additions and 25 deletions
|
|
@ -12,6 +12,9 @@ fun test() -> f64 {
|
|||
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!
|
||||
}
|
||||
|
|
@ -19,4 +22,4 @@ fun test() -> f64 {
|
|||
}
|
||||
|
||||
// @no-errors
|
||||
// @eval: Float(1001.0)
|
||||
// @eval: Float(1101.0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue