-(defmethod reader-function ((class ginstance-class) &rest args)
- (declare (ignore args))
- #'(lambda (location &optional (offset 0) weak-p)
- (declare (ignore weak-p))
- (ensure-proxy-instance class (sap-ref-sap location offset))))
+(define-type-method reader-function ((type ginstance))
+ (let ((class (type-expand type)))
+ #'(lambda (location &optional (offset 0) weak-p)
+ (declare (ignore weak-p))
+ (ensure-proxy-instance class (sap-ref-sap location offset)))))