mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Merge pull request #2017 from rtfeldman/i/1513
Add test case for former issue
This commit is contained in:
commit
71a46166d2
1 changed files with 21 additions and 0 deletions
|
@ -968,3 +968,24 @@ fn update_the_only_field() {
|
|||
i64
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
// https://github.com/rtfeldman/roc/issues/1513
|
||||
fn both_have_unique_fields() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
a = { x: 42, y: 43 }
|
||||
b = { x: 42, z: 44 }
|
||||
|
||||
f : { x : I64 }a, { x : I64 }b -> I64
|
||||
f = \{ x: x1}, { x: x2 } -> x1 + x2
|
||||
|
||||
f a b
|
||||
"#
|
||||
),
|
||||
84,
|
||||
i64
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue