Don't add path instructions for newtypes that decay into their args

This commit is contained in:
Ayaz Hafiz 2022-07-21 14:57:17 -04:00
parent 52e15bd344
commit 1acb7e0748
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
5 changed files with 44 additions and 11 deletions

View file

@ -1886,17 +1886,12 @@ fn encode_derived_tag_two_payloads_string() {
}
#[mono_test]
fn issue_3560_nested_tag_union() {
fn issue_3560_nested_tag_constructor_is_newtype() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
provides [main] to "./platform"
main =
when Wrapper (Payload "err") is
Wrapper (Payload str) -> str
Wrapper (AlternatePayload str) -> str
when Wrapper (Payload "err") is
Wrapper (Payload str) -> str
Wrapper (AlternatePayload str) -> str
"#
)
}