Better error message
parent
14b78f348e
commit
6ee115901a
core
parser
syntax
|
@ -345,6 +345,11 @@ M: invalid-slot-name summary
|
|||
[ >r tuple parse-tuple-slots r> prefix ]
|
||||
} case 3dup check-slot-shadowing ;
|
||||
|
||||
ERROR: not-in-a-method-error ;
|
||||
|
||||
M: not-in-a-method-error summary
|
||||
drop "call-next-method can only be called in a method definition" ;
|
||||
|
||||
ERROR: staging-violation word ;
|
||||
|
||||
M: staging-violation summary
|
||||
|
|
|
@ -189,8 +189,12 @@ IN: bootstrap.syntax
|
|||
] define-syntax
|
||||
|
||||
"call-next-method" [
|
||||
current-class get literalize parsed
|
||||
current-generic get literalize parsed
|
||||
\ (call-next-method) parsed
|
||||
current-class get current-generic get
|
||||
2dup [ word? ] both? [
|
||||
[ literalize parsed ] bi@
|
||||
\ (call-next-method) parsed
|
||||
] [
|
||||
not-in-a-method-error
|
||||
] if
|
||||
] define-syntax
|
||||
] with-compilation-unit
|
||||
|
|
Loading…
Reference in New Issue