Skip to content

Commit

Permalink
Choose first constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Mar 1, 2024
1 parent 2b687f1 commit 66e8f32
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/Base_Tests/src/Semantic/Conversion_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,19 @@ add_specs suite_builder =
msg . should_contain "expected expression to be Back"
msg . should_contain "but got ~Value"

group_builder.specify "Choose first constructor" <|
v = ~Value 10

m_foo (m:Foo|Bar|Back) = m
m_bar (m:Bar|Foo|Back) = m
m_back_foo (m:Back|Foo|Bar) = m
m_back_bar (m:Back|Bar|Foo) = m

m_foo v . should_equal <| Foo.Value 10
m_bar v . should_equal <| Bar.Value 10
m_back_foo v . should_equal <| Foo.Value 10
m_back_bar v . should_equal <| Bar.Value 10

suite_builder.group "Polyglot Argument" group_builder->
f1 (x : DateTimeFormatter) = x.to_text
f2 (x : Text | DateTimeFormatter) = case x of
Expand Down

0 comments on commit 66e8f32

Please sign in to comment.