Created
April 14, 2018 15:47
-
-
Save cyanglee/427e5f114011b76516a26f543c40b096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> bill = { name = "Gates", age = 57 } | |
{ name = "Gates", age = 57 } : { age : number, name : String } | |
> { bill | test = "123" } | |
-- TYPE MISMATCH --------------------------------------------- repl-temp-000.elm | |
`bill` is being used in an unexpected way. | |
4| { bill | test = "123" } | |
^^^^ | |
Based on its definition, `bill` has this type: | |
{ age : ..., name : ... } | |
But you are trying to use it as: | |
{ b | test : ... } | |
Hint: The record fields do not match up. One has age and name. The other has | |
test. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment