dpc icon indicating copy to clipboard operation
dpc copied to clipboard

"define" does not work in class/1 or above

Open takikawa opened this issue 13 years ago • 2 comments

The following code fails with an error:

#lang class/1

(define-class point%
  (fields x y)
  (define (move-x dx)
    (new point%
         (+ (send this x) dx)
         (send this y))))

The error is "define-class: There were multiple syntax errors. The first error follows: expected the identifier `isl+:check-range' in: define"

This is a problem since class/1 and higher are supposed to be supersets of class/0.

takikawa avatar Jan 31 '12 03:01 takikawa

Right, we haven't propagated changes from class/0 into class/1.

On Mon, Jan 30, 2012 at 10:47 PM, Asumu Takikawa [email protected] wrote:

The following code fails with an error:

   #lang class/1

   (define-class point%      (fields x y)      (define (move-x dx)        (new point%             (+ (send this x) dx)             (send this y))))

The error is  "define-class: There were multiple syntax errors. The first error follows: expected the identifier `isl+:check-range' in: define"

This is a problem since class/1 and higher are supposed to be supersets of class/0.


Reply to this email directly or view it on GitHub: https://github.com/dvanhorn/dpc/issues/9

sam th [email protected]

samth avatar Jan 31 '12 04:01 samth

I fixed this for class/1 through class/3 for now.

takikawa avatar Jan 31 '12 04:01 takikawa