diff options
Diffstat (limited to 'tests/iii/class-constructor-nested-new-error')
| -rw-r--r-- | tests/iii/class-constructor-nested-new-error/case.json | 8 | ||||
| -rw-r--r-- | tests/iii/class-constructor-nested-new-error/program.cps | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/iii/class-constructor-nested-new-error/case.json b/tests/iii/class-constructor-nested-new-error/case.json new file mode 100644 index 0000000..414816c --- /dev/null +++ b/tests/iii/class-constructor-nested-new-error/case.json @@ -0,0 +1,8 @@ +{ + "errors": [ + { + "reason": "NEW is only allowed on the right of an assignment", + "line": 5 + } + ] +} diff --git a/tests/iii/class-constructor-nested-new-error/program.cps b/tests/iii/class-constructor-nested-new-error/program.cps new file mode 100644 index 0000000..b0bd349 --- /dev/null +++ b/tests/iii/class-constructor-nested-new-error/program.cps @@ -0,0 +1,5 @@ +CLASS Box + PROCEDURE NEW(Other : Box) + ENDPROCEDURE +ENDCLASS +DECLARE Item : Box(NEW Box) |
