Fix a private/augment method issue
original commit: e25b24986fc2c141a0abd8a4f6f4245f94d1f379
This commit is contained in:
parent
8e7bfb9ad8
commit
211f4f4db5
|
@ -565,7 +565,9 @@
|
|||
(for/list ([f (in-set names)])
|
||||
(define pre-type (dict-ref type-map f #f))
|
||||
(define maybe-type (if (pair? pre-type) (car pre-type) pre-type))
|
||||
(or (and maybe-type (fixup-method-type maybe-type self-type))
|
||||
(or (and maybe-type
|
||||
(not (equal? maybe-type top-func))
|
||||
(fixup-method-type maybe-type self-type))
|
||||
(make-Univ))))
|
||||
|
||||
(define private-method-types
|
||||
|
|
|
@ -1044,5 +1044,11 @@
|
|||
(: c% (Class (field [x String])))
|
||||
(define c%
|
||||
(class object% (super-new)
|
||||
(field [x : Integer 5]))))))
|
||||
(field [x : Integer 5]))))
|
||||
|
||||
;; fails, but make sure it's not an internal error
|
||||
(check-err #:exn #rx"Cannot apply expression of type Any"
|
||||
(class object% (super-new)
|
||||
(define/pubment (foo x) 0)
|
||||
(define/public (g x) (foo 3))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user