mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-25 21:37:48 +00:00
Don't add path instructions for newtypes that decay into their args
This commit is contained in:
parent
d4ad981448
commit
eee13a4aa3
5 changed files with 44 additions and 11 deletions
|
|
@ -1805,3 +1805,19 @@ fn instantiate_annotated_as_recursive_alias_multiple_polymorphic_expr() {
|
|||
i64
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn issue_3560_nested_tag_constructor_is_newtype() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when Wrapper (Payload "err") is
|
||||
Wrapper (Payload str) -> str
|
||||
Wrapper (AlternatePayload str) -> str
|
||||
"#
|
||||
),
|
||||
RocStr::from("err"),
|
||||
RocStr
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue