Unquoteable (this) if followed by colon notation
Minimal example:
'(define-simple-class Foo () ((m1) "ok") ((m2) ((this):m1)))
;; /dev/stdin:1:1: use of 'this' not in a named method
All of the following examples work instead. Maybe of interest: in the last example, ((this):m1)
is read from the string without error.
;; works:
(define-simple-class Foo () ((m1) "ok") ((m2) ((this):m1)))
;; works:
(define-simple-class Foo () ((m1) "ok") ((m2) (invoke (this) 'm1)))
;; works:
'(define-simple-class Foo () ((m1) "ok") ((m2) (invoke (this) 'm1)))
;; works, returns: "ok"
((Foo):m2)
;; works, returns: unevaluated list
'(define-simple-class Bar () ((m1) "ok") ((m2) (invoke (this) 'm1)))
;; works, returns:
;; (define-simple-class Foo () ((m1) ok)
;; ((m2) (($lookup$ (this) (quasiquote m1)))))
(read (open-input-string
"(define-simple-class Foo () ((m1) \"ok\") ((m2) ((this):m1)))"))