elm-verify-examples icon indicating copy to clipboard operation
elm-verify-examples copied to clipboard

invalid generated code for case of

Open lue-bird opened this issue 4 years ago • 1 comments

For the example code

case Just 3 of
    Nothing ->
        0

    Just _ ->
        1
--> 1

elm-verify-examples generates

Test.test "#step: \n\n        Just _ ->\n            1\n    --> 1" <|
    \() ->
        Expect.equal
            (
                Just _ ->
                    1
            )
            (
            1
            )

Strangely, the case of only generates valid code if used in a function without annotation.

lue-bird avatar Nov 11 '21 17:11 lue-bird

there is no way fix for this case right now. we got to switch to a proper elm parser in the future to get this covered. I'm not planning to work on this any time soon though, sorry

stoeffel avatar Nov 11 '21 19:11 stoeffel

Duplicate of #78.

gampleman avatar Oct 20 '23 13:10 gampleman