Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid generated code for case of #100

Closed
lue-bird opened this issue Nov 11, 2021 · 2 comments
Closed

invalid generated code for case of #100

lue-bird opened this issue Nov 11, 2021 · 2 comments
Labels
bug parsing Relates to parsing code or examples

Comments

@lue-bird
Copy link

lue-bird commented Nov 11, 2021

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.

@stoeffel
Copy link
Owner

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

@gampleman gampleman added bug parsing Relates to parsing code or examples labels Oct 20, 2023
@gampleman
Copy link
Collaborator

Duplicate of #78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug parsing Relates to parsing code or examples
Projects
None yet
Development

No branches or pull requests

3 participants