Merge branch 'main' of github.com:rtfeldman/roc into wasm_module_crate

This commit is contained in:
Brian Carroll 2022-11-21 19:49:00 +00:00
commit 880ef2704c
No known key found for this signature in database
GPG key ID: 9CF4E3BF9C4722C7
48 changed files with 1207 additions and 639 deletions

View file

@ -2513,7 +2513,7 @@ fn function_malformed_pattern() {
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
#[should_panic(expected = "Hit an erroneous type when creating a layout for")]
#[ignore = "causes alias analysis panics, should roc_panic"]
fn call_invalid_layout() {
assert_evals_to!(
indoc!(

View file

@ -1642,7 +1642,7 @@ fn issue_2777_default_branch_codegen() {
not(target_family = "windows"),
any(feature = "gen-llvm", feature = "gen-wasm")
))]
#[should_panic(expected = "Erroneous")]
#[should_panic(expected = r#"Roc failed with message: "Tag Foo was part of a type error!""#)]
fn issue_2900_unreachable_pattern() {
assert_evals_to!(
indoc!(
@ -1846,7 +1846,7 @@ fn alignment_i128() {
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
#[should_panic(expected = r#"Roc failed with message: "Erroneous: Expr::Closure""#)]
#[ignore = "causes alias analysis panics, should roc_panic"]
fn error_type_in_tag_union_payload() {
assert_evals_to!(
indoc!(
@ -2022,3 +2022,28 @@ fn dispatch_tag_union_function_inferred() {
RocStr
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn issue_4077_fixed_fixpoint() {
assert_evals_to!(
indoc!(
r#"
app "test" provides [main] to "./platform"
Input : [FromProjectSource, FromJob Job]
Job : [Job { inputs : List Input }]
job : { inputs : List Input } -> Job
job = \config -> Job config
main =
when job { inputs: [] } is
_ -> "OKAY"
"#
),
RocStr::from("OKAY"),
RocStr
);
}