Use runtime representation of values when building structural eq

Closes #4348
This commit is contained in:
Ayaz Hafiz 2022-10-17 11:36:06 -05:00
parent 99ad019d75
commit 7986514d20
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 20 additions and 0 deletions

View file

@ -4085,3 +4085,21 @@ fn pattern_match_char() {
RocStr
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn issue_4348() {
assert_evals_to!(
indoc!(
r#"
str = "z"
(\_ ->
when str is
"z" -> "okay"
_ -> "") "FAIL"
"#
),
RocStr::from("okay"),
RocStr
);
}