Rewrite this a little to make it clear that we're now only checking the

super class's beta-methods vector to make sure this is even an overrideable
method.

svn: r18181
This commit is contained in:
Stevie Strickland 2010-02-19 04:59:05 +00:00
parent 55d39b0035
commit 6777fc31a3

View File

@ -2142,22 +2142,21 @@
;; -- Extract superclass methods and make rename-inners --- ;; -- Extract superclass methods and make rename-inners ---
(let ([rename-supers (map (lambda (index mname) (let ([rename-supers (map (lambda (index mname)
;; While the last part of the vector is indeed the right
;; method, if there have been super contracts placed since,
;; they won't be reflected there, only in the super-methods
;; vector of the superclass.
(let ([vec (vector-ref (class-beta-methods super) index)]) (let ([vec (vector-ref (class-beta-methods super) index)])
(if (positive? (vector-length vec)) (when (and (positive? (vector-length vec))
;; While the last part of the vector is indeed the right (not (vector-ref vec (sub1 (vector-length vec)))))
;; method, if there have been super contracts placed since, (obj-error 'class*
;; they won't be reflected there, only in the super-methods (string-append
;; vector of the superclass. "superclass ~e method for override, overment, inherit/super, "
(if (vector-ref vec (sub1 (vector-length vec))) "or rename-super is not overrideable: ~a~a")
(vector-ref (class-super-methods super) index) super
(obj-error 'class* mname
(string-append (for-class name))))
"superclass ~e method for override, overment, inherit/super, " (vector-ref (class-super-methods super) index))
"or rename-super is not overrideable: ~a~a")
super
mname
(for-class name)))
(vector-ref (class-super-methods super) index))))
rename-super-indices rename-super-indices
rename-super-names)] rename-super-names)]
[rename-inners (let ([new-augonly (make-vector method-width #f)]) [rename-inners (let ([new-augonly (make-vector method-width #f)])