fix: added explanation for nested pair error, added more errors
This commit is contained in:
parent
a2c81883f4
commit
f24f8c87d8
@ -110,8 +110,9 @@ object parser {
|
||||
private lazy val `<pair-elem-type>` =
|
||||
(`<base-type>` <**> (`<array-type>` </> identity)) |
|
||||
((UntypedPairType from `<pair-type>`) <**>
|
||||
((`<pair-elems-type>` <**> `<array-type>`)
|
||||
.map(arr => (_: UntypedPairType) => arr) </> identity))
|
||||
((`<pair-elems-type>` <**> `<array-type>`.explain(
|
||||
"non-erased pair types cannot be nested"
|
||||
)).map(arr => (_: UntypedPairType) => arr) </> identity))
|
||||
|
||||
// Statements
|
||||
private lazy val `<program>` = Program(
|
||||
|
Loading…
x
Reference in New Issue
Block a user