Additional record pattern test
This commit is contained in:
parent
4c6a93302d
commit
8798650024
@ -193,6 +193,16 @@ if alpha {
|
|||||||
is _ then ("nooo", 8888)
|
is _ then ("nooo", 8888)
|
||||||
}"#;
|
}"#;
|
||||||
eval_assert(source, r#"("sanchez", 20)"#);
|
eval_assert(source, r#"("sanchez", 20)"#);
|
||||||
|
|
||||||
|
let source = r#"
|
||||||
|
type Vstsavlobs = { tkveni: Int, b: Ia }
|
||||||
|
type Ia = { sitqva: Int, ghmerts: String }
|
||||||
|
let b = Vstsavlobs::Vstsavlobs { tkveni: 3, b: Ia::Ia { sitqva: 5, ghmerts: "ooo" } }
|
||||||
|
if b {
|
||||||
|
is Vstsavlobs::Vstsavlobs { tkveni: _, b: Ia::Ia { sitqva, ghmerts } } then sitqva
|
||||||
|
is _ then 5000
|
||||||
|
}"#;
|
||||||
|
eval_assert(source, "5");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user