Correction to bug for accessing private field
svn: r2791
This commit is contained in:
parent
bdcaaa5c35
commit
f0564d5746
|
@ -2257,7 +2257,7 @@
|
||||||
(javaRuntime:nullError 'field)
|
(javaRuntime:nullError 'field)
|
||||||
(send ,expr ,(translate-id field-string field-src)))
|
(send ,expr ,(translate-id field-string field-src)))
|
||||||
(build-src src))))
|
(build-src src))))
|
||||||
((and (eq? (var-access-access access) 'private) (or (static-method) (inner-class)))
|
((and (eq? (var-access-access access) 'private) #;(or (static-method) (inner-class)))
|
||||||
(let* ((id (create-get-name field-string (var-access-class access)))
|
(let* ((id (create-get-name field-string (var-access-class access)))
|
||||||
(getter `(send ,expr ,id ,expr))
|
(getter `(send ,expr ,id ,expr))
|
||||||
(get-syntax (if cant-be-null?
|
(get-syntax (if cant-be-null?
|
||||||
|
|
|
@ -347,6 +347,16 @@ class WeeklyPlanner{
|
||||||
(list (make-java-string "llo"))
|
(list (make-java-string "llo"))
|
||||||
"Test of substring")
|
"Test of substring")
|
||||||
|
|
||||||
|
(interact-test
|
||||||
|
"class A2 {
|
||||||
|
private int a;
|
||||||
|
A2(int a) { this.a = a; }
|
||||||
|
int g(A2 b) { return b.a; }
|
||||||
|
}"
|
||||||
|
'advanced
|
||||||
|
(list "new A2(1).g(new A2(2))")
|
||||||
|
(list 2)
|
||||||
|
"Test of private field access")
|
||||||
|
|
||||||
(report-test-results)
|
(report-test-results)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user