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)
(let ([vec (vector-ref (class-beta-methods super) index)])
(if (positive? (vector-length vec))
;; While the last part of the vector is indeed the right ;; While the last part of the vector is indeed the right
;; method, if there have been super contracts placed since, ;; method, if there have been super contracts placed since,
;; they won't be reflected there, only in the super-methods ;; they won't be reflected there, only in the super-methods
;; vector of the superclass. ;; vector of the superclass.
(if (vector-ref vec (sub1 (vector-length vec))) (let ([vec (vector-ref (class-beta-methods super) index)])
(vector-ref (class-super-methods super) index) (when (and (positive? (vector-length vec))
(not (vector-ref vec (sub1 (vector-length vec)))))
(obj-error 'class* (obj-error 'class*
(string-append (string-append
"superclass ~e method for override, overment, inherit/super, " "superclass ~e method for override, overment, inherit/super, "
"or rename-super is not overrideable: ~a~a") "or rename-super is not overrideable: ~a~a")
super super
mname mname
(for-class name))) (for-class name))))
(vector-ref (class-super-methods super) index)))) (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)])