Elm Exactly
Results / elm-error-catalogue /

ErrorMessagesIssue234DivTooManyArgsTest

Tags:elm19-compile-errorerror-message

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass

Issue: elm/error-message-catalog#234

`Html.div` applied to four arguments is reported as TOO MANY ARGS, saying it expects 2.

<https://github.com/elm/error-message-catalog/issues/234>

`main` is `Html.div [] [] [] []`. The report must say `div` expects 2 arguments and got 4,
and no report may say it expects 3.

Results

elm-0.19.1

pass
Output
Compiling ...-- TOO MANY ARGS --------------- src/ErrorMessagesIssue234DivTooManyArgsTest.elm

The `div` function expects 2 arguments, but it got 4 instead.

22|     Html.div [] [] [] []
        ^^^^^^^^
Are there any missing commas? Or missing parentheses?

Detected problems in 1 module.

elm-0.19.2

pass
Output
Compiling ...-- TOO MANY ARGS --------------- src/ErrorMessagesIssue234DivTooManyArgsTest.elm

The `div` function expects 2 arguments, but it got 4 instead.

22|     Html.div [] [] [] []
        ^^^^^^^^
Are there any missing commas? Or missing parentheses?

Detected problems in 1 module.

elm-0.19.3

pass
Output
Compiling ...-- TOO MANY ARGS --------------- src/ErrorMessagesIssue234DivTooManyArgsTest.elm

The `div` function expects 2 arguments, but it got 4 instead.

22|     Html.div [] [] [] []
        ^^^^^^^^
Are there any missing commas? Or missing parentheses?

Detected problems in 1 module.

lamdera-1.5.0

pass
Output
Detected problems in 1 module.
-- TOO MANY ARGS --------------- src/ErrorMessagesIssue234DivTooManyArgsTest.elm

The `div` function expects 2 arguments, but it got 4 instead.

22|     Html.div [] [] [] []
        ^^^^^^^^
Are there any missing commas? Or missing parentheses?

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm-error-catalogue/ErrorMessagesIssue234DivTooManyArgsTest] in its title.

Source

The -- CHECK: lines give the expected output.

module ErrorMessagesIssue234DivTooManyArgsTest exposing (main)
{-| `Html.div` applied to four arguments is reported as TOO MANY ARGS, saying it expects 2.
<https://github.com/elm/error-message-catalog/issues/234>
`main` is `Html.div [] [] [] []`. The report must say `div` expects 2 arguments and got 4,
and no report may say it expects 3.
-}
-- TAGS: elm19-compile-error, error-message
-- COMPILE-ERROR: TOO MANY ARGS, Html.div given four arguments
-- CHECK: -- TOO MANY ARGS -
-- CHECK: The `div` function expects 2 arguments, but it got 4 instead.
-- CHECK-NOT: expects 3 arguments
import Html
main =
Html.div [] [] [] []