Skip to content

Commit

Permalink
Check type qualification for Arg.customWithType patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
miniBill committed Nov 30, 2024
1 parent 8f182d8 commit bf01e81
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Pattern.elm
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,21 @@ suite =
"""
\\(From.Here.Variant 'c') -> "There is 1 item"
"""
, test "custom type helpers - type qualification" <|
\() ->
Elm.Expect.declarationAs
(Elm.declaration "fn" <|
Elm.fn
(Arg.customTypeWith { importFrom = [ "From", "Here" ], variantName = "Variant", typeName = "SomeType" } identity
|> Arg.item (Arg.char 'c')
)
(\_ -> Elm.string "There is 1 item")
)
"""
fn : From.Here.SomeType -> String
fn (From.Here.Variant 'c') =
"There is 1 item"
"""
, describe "literal patterns"
[ test "unit" <|
\() ->
Expand Down

0 comments on commit bf01e81

Please sign in to comment.