To my reading the error shown below reads the wrong way around.
Example 1
x =
case {a = 1} of
(a, b) ->
""
_ ->
""
Actual error
-- TYPE MISMATCH ---------------------------------------------------------------
Tag `_Tuple2` is causing problems in this pattern match.
7| (a, b) ->
^^^^^^
This pattern matches things of type:
{ a : number }
But the values it will actually be trying to match are:
( a, b )
Expected error
-- TYPE MISMATCH ---------------------------------------------------------------
Tag `_Tuple2` is causing problems in this pattern match.
7| (a, b) ->
^^^^^^
This pattern matches things of type:
(a, b)
But the values it will actually be trying to match are:
{ a : number }
Example 2
y =
case {a = 1} of
[a, b] ->
""
_ ->
""
yields a similar error, with the messages inverted (relative to my expectations at least).
To my reading the error shown below reads the wrong way around.
Example 1
Actual error
Expected error
Example 2
yields a similar error, with the messages inverted (relative to my expectations at least).