removed defclass

This commit is contained in:
2024-10-03 17:21:08 +09:00
parent bcaae10bef
commit ed978e6f2d
13 changed files with 139 additions and 97 deletions

View File

@ -21,7 +21,6 @@ check_ERRORS = \
mlist-5001.err \
var-5001.err \
var-5002.err \
var-5003.err \
var-5004.err
##noinst_SCRIPTS = $(check_SCRIPTS)

View File

@ -493,7 +493,6 @@ check_ERRORS = \
mlist-5001.err \
var-5001.err \
var-5002.err \
var-5003.err \
var-5004.err
EXTRA_DIST = $(check_SCRIPTS) $(check_ERRORS)

View File

@ -15,6 +15,43 @@ class B + ##ERROR: syntax error - prohibited binary selector '+'
---
class A [ a ] {
| j | ##ERROR: syntax error - variable declaration disallowed in class init scope
}
---
class 10 [ a ] { ##ERROR: syntax error - invalid class name '10' for 'class'
}
---
class class { ##ERROR: syntax error - invalid class name 'class' for 'class'
}
---
class super.a [ a ] { ##ERROR: syntax error - invalid class name 'super.a' for 'class'
}
---
class a :: 20 { ##ERROR: syntax error - invalid superclass name '20' after '::' for 'class'
}
---
class a :: class { ##ERROR: syntax error - invalid superclass name 'class' after '::' for 'class'
}
---
class a :: #(1 2) { ##ERROR: syntax error - no valid superclass name after '::' for 'class'
}
---
J := 11
class B {
if (== J 10) {

View File

@ -96,7 +96,7 @@ if (== y 29) {
## --------------------------------------
defclass A [ a b c ] {
class A [ a b c ] {
fun(#ci) newInstance(x y z) {
set a x
set b y

View File

@ -31,7 +31,7 @@
## test return variables in message sends
defclass B [ [X1 X2] ] {
class B [ [X1 X2] ] {
set X1 999;
set X2 888;

View File

@ -1,4 +1,4 @@
defclass A [ a ] {
class A [ a ] {
fun(#ci) init1() {
| b |
set b (+ 1 2);

View File

@ -1,3 +0,0 @@
defclass A [ a ] {
| j | ##ERROR: syntax error - variable declaration disallowed in class init scope
};

View File

@ -79,22 +79,22 @@ fun fun fun1() { ##ERROR: syntax error - invalid function name 'fun' for 'fun'
---
fun(#ci) fun1() { ##ERROR: syntax error - unsupported attribute list for plain function 'fun1'
fun(#ci) fun1() { ##ERROR: syntax error - attribute list prohibited on plain function 'fun1'
}
---
fun() () { ##ERROR: syntax error - unsupported attribute list for unamed function for 'fun'
fun() () { ##ERROR: syntax error - attribute list prohibited on unamed function for 'fun'
}
---
fun() X:y() { ##ERROR: syntax error - empty attribute list for 'X:y' for 'fun'
fun() X:y() { ##ERROR: syntax error - empty attribute list on 'X:y' for 'fun'
}
---
class X {
fun() y() { ##ERROR: syntax error - empty attribute list for 'y' for 'fun'
fun() y() { ##ERROR: syntax error - empty attribute list on 'y' for 'fun'
}
}