diff --git a/src/main/wacc/parser.scala b/src/main/wacc/parser.scala index 5751732..247ae31 100644 --- a/src/main/wacc/parser.scala +++ b/src/main/wacc/parser.scala @@ -110,8 +110,9 @@ object parser { private lazy val `` = (`` <**> (`` identity)) | ((UntypedPairType from ``) <**> - ((`` <**> ``) - .map(arr => (_: UntypedPairType) => arr) identity)) + ((`` <**> ``.explain( + "non-erased pair types cannot be nested" + )).map(arr => (_: UntypedPairType) => arr) identity)) // Statements private lazy val `` = Program(