mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-15 21:23:57 +00:00
Fix bug in unification of tag args in polymorphic contexts
This commit is contained in:
parent
f0b3c3eb08
commit
8abd5cf605
3 changed files with 69 additions and 1 deletions
|
|
@ -1925,6 +1925,28 @@ fn encode_derived_tag_one_field_string() {
|
|||
)
|
||||
}
|
||||
|
||||
#[mono_test(no_check)]
|
||||
fn polymorphic_expression_unification() {
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
RenderTree : [
|
||||
Text Str,
|
||||
Indent (List RenderTree),
|
||||
]
|
||||
parseFunction : Str -> RenderTree
|
||||
parseFunction = \name ->
|
||||
last = Indent [Text ".trace(\"\(name)\")" ]
|
||||
Indent [last]
|
||||
|
||||
values = parseFunction "interface_header"
|
||||
|
||||
main = values == Text ""
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn encode_derived_tag_two_payloads_string() {
|
||||
indoc!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue