Closed lue-bird closed 3 years ago
{ RecordAlias | extraField : () } type alias RecordAlias = {} -- any record (alias)
doesn't compile:
I just started parsing a record type, but I got stuck here: { TypeAlias | extraField : () } ^ Record types look like { name : String, age : Int }, so I was expecting to see a field name next.
I just started parsing a record type, but I got stuck here:
{ TypeAlias | extraField : () } ^
Record types look like { name : String, age : Int }, so I was expecting to see a field name next.
It works with a type variable:
type alias WithExtraField a = { a | extraField : () } WithExtraField RecordAlias
Unless not being able to write a type like in the first line is intentional, elm should allow this syntax to be more consistent.
Thanks for reporting this! To set expectations:
Finally, please be patient with the core team. They are trying their best with limited resources.
doesn't compile:
It works with a type variable:
Unless not being able to write a type like in the first line is intentional, elm should allow this syntax to be more consistent.