aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 15:17:31 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 15:21:11 +0000
commitfe70048b33baebdfbf7071059bd4742ec16ab408 (patch)
tree040ab1e1d6847baf8b60b8c1970543b8e578e36f /tests
parent98ef8bc4dfcebe44eece933ff0affc776b7199dd (diff)
fix(classes): defer NEW for DECLARE without a parameterless constructor
A plain DECLARE, field or array element now calls NEW only when the class has a parameterless one; otherwise the zeroed object waits for x <- NEW C(...), as in guide section 10.2. DECLARE with parentheses still requires a matching constructor. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/iii/class-constructor-default-errors/case.json12
-rw-r--r--tests/iii/class-overload-errors/case.json4
2 files changed, 0 insertions, 16 deletions
diff --git a/tests/iii/class-constructor-default-errors/case.json b/tests/iii/class-constructor-default-errors/case.json
index adcefe8..7527470 100644
--- a/tests/iii/class-constructor-default-errors/case.json
+++ b/tests/iii/class-constructor-default-errors/case.json
@@ -2,10 +2,6 @@
"errors": [
{
"reason": "Incorrect # arguments passed to Required.NEW",
- "line": 15
- },
- {
- "reason": "Incorrect # arguments passed to Required.NEW",
"line": 16
},
{
@@ -17,14 +13,6 @@
"line": 18
},
{
- "reason": "Incorrect # arguments passed to Required.NEW",
- "line": 19
- },
- {
- "reason": "Incorrect # arguments passed to Required.NEW",
- "line": 20
- },
- {
"reason": "Constructor arguments require a class type",
"line": 21
}
diff --git a/tests/iii/class-overload-errors/case.json b/tests/iii/class-overload-errors/case.json
index afc0e6a..ea103c0 100644
--- a/tests/iii/class-overload-errors/case.json
+++ b/tests/iii/class-overload-errors/case.json
@@ -5,10 +5,6 @@
"line": 4
},
{
- "reason": "No matching overload for Required.NEW\\(\\)",
- "line": 17
- },
- {
"reason": "Cannot access private method Set of type Secret",
"line": 19
},