Merge pull request #4350 from roc-lang/i4348

Use runtime representation of values when building structural eq
This commit is contained in:
Folkert de Vries 2022-10-23 01:19:17 +02:00 committed by GitHub
commit bcf2fc340d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
);
}