Corrected a bug with packages and protected access

svn: r2711
This commit is contained in:
Kathy Gray 2006-04-19 03:09:31 +00:00
parent 9fe113940e
commit f0fe9a4d47
2 changed files with 19 additions and 6 deletions

View File

@ -2157,11 +2157,20 @@
(equal? "super" (special-name-name expr)))
(call-abstract-error level name exp-type src))
(when (and (memq 'protected mods) (reference-type? exp-type)
(or (not (is-eq-subclass? this exp-type type-recs))
(not (package-members? c-class (cons (ref-type-class/iface exp-type) (ref-type-path exp-type))
type-recs))))
(call-access-error 'pro level name exp-type src))
(when (and (memq 'protected mods)
(reference-type? exp-type))
(unless (or (is-eq-subclass? this exp-type type-recs)
(let* ((e-class (ref-type-class/iface exp-type))
(e-path (ref-type-path exp-type))
(true-path (if (null? e-path)
(send type-recs lookup-path e-class (lambda () null))
e-path)))
#;(printf "~a ~a ~a~n" c-class (cons e-class true-path)
(send type-recs get-interactions-package))
(package-members? c-class
(cons e-class true-path)
type-recs)))
(call-access-error 'pro level name exp-type src)))
(when (and (memq 'private mods)
(reference-type? exp-type)
(if static?

View File

@ -573,7 +573,11 @@
(eq? 'anonymous kind)
(eq? 'statement kind))
provides)
,@(if (null? restricted-methods)
,@(if (null? (accesses-private methods))
null
(list
(create-local-names (make-method-names (accesses-private methods) null))))
#;(if (null? restricted-methods)
null
(list (create-local-names (append (make-method-names (accesses-private methods) null)
restricted-methods))))