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

Nested layouts with a variable in Props fail #164

Closed
wants to merge 1 commit into from

Conversation

domenkozar
Copy link

🌈  Elm Land (v0.19.5) failed to build project
    ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
-- UNEXPECTED TYPE ANNOTATION ------------------- src/Layouts/Sidebar/Header.elm

I found an unexpected type annotation on this layout function.

  layout : Props contentMsg -> Shared.Model -> Route () -> Layout Layouts.Sidebar.Props contentMsg Model Msg contentMsg
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I recommend one of these annotations:

  layout : Props -> Shared.Model -> Route () -> Layout Layouts.Sidebar.Props Model Msg contentMsg

  layout : Props contentMsg -> Shared.Model -> Route () -> Layout Layouts.Sidebar.Props Model Msg contentMsg

Although Elm annotations are optional, Elm Land requires an annotation for
this particular function to avoid showing errors in generated code.

Hint: Read https://elm.land/problems#unexpected-type-annotation to learn more

Copy link

netlify bot commented Feb 6, 2024

Deploy Preview for elm-land canceled.

Name Link
🔨 Latest commit c2c44ec
🔍 Latest deploy log https://app.netlify.com/sites/elm-land/deploys/65c24af8a666600008a7eba6

@domenkozar
Copy link
Author

@ryan-haskell any chance you can give this a look?

@ryan-haskell
Copy link
Contributor

ryan-haskell commented Apr 15, 2024

Hey @domenkozar – this is going to be fixed in the v0.20.1 release! Closing this PR, but thank you for the short example you included!

Here's that PR:
#175

@domenkozar
Copy link
Author

domenkozar commented Apr 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants