diff --git a/collects/profj/build-info.ss b/collects/profj/build-info.ss index 3bc9f14be0..44b5aa5411 100644 --- a/collects/profj/build-info.ss +++ b/collects/profj/build-info.ss @@ -1754,12 +1754,12 @@ (case kind ((file) (format "Required file ~a, for class or interface ~a, not found" (string-append (path->ext path) ".java") (path->ext path))) - ((dir) (format "Required directory ~a not found" (path->ext path)))) + ((dir) (format "Required directory, for package ~a not found" (path->ext path)))) k src)) (raise-error (string->symbol (car path)) (case kind - ((file) (format "Class or interface ~a is not known" (path->ext path))) - ((dir) (format "Directory to search, ~a, is not known" (path->ext path)))) + ((file) (format "Class or interface ~a is not known." (path->ext path))) + ((dir) (format "Package ~a is not known." (path->ext path)))) (string->symbol (car path)) src))) diff --git a/collects/profj/to-scheme.ss b/collects/profj/to-scheme.ss index fd7b006380..0c48f7b9ec 100644 --- a/collects/profj/to-scheme.ss +++ b/collects/profj/to-scheme.ss @@ -605,18 +605,18 @@ (else (cons (string->symbol (format "~a~~f" (car args))) (loop (cdr args))))))))) ,@(let ((translated-fields (map - (lambda (f) (translate-field (map modifier-kind (field-modifiers f)) - (field-type-spec f) - (field-name f) - (and (var-init? f) f) - (if (var-init? f) - (var-init-src f) - (var-decl-src f)) - #f)) - (append (accesses-public fields) - (accesses-package fields) - (accesses-protected fields) - (accesses-private fields))))) + (lambda (f) + (translate-field (map modifier-kind (field-modifiers f)) + (field-type-spec f) + (field-name f) + (and (var-init? f) f) + (if (var-init? f) + (var-init-src f) + (var-decl-src f)) + #f)) + (reverse (filter (lambda (f) + (not (memq 'static (map modifier-kind (field-modifiers f))))) + (members-field class-members)))))) (append (map car translated-fields) (map cadr translated-fields))) diff --git a/collects/tests/profj/advanced-tests.ss b/collects/tests/profj/advanced-tests.ss index 368f9da19d..f59aa79fa7 100644 --- a/collects/tests/profj/advanced-tests.ss +++ b/collects/tests/profj/advanced-tests.ss @@ -234,6 +234,29 @@ class WeeklyPlanner{ ;;Interaction tests, mix of right and error + (interact-test + "class A { + private int x = 10; + public int y = x * 2; + } + class B { + public int x = 10; + private int y = x * 2; + public int report() { return y; } + } + class C { + public int x = 10; + public int y = 2 * x; + } + class D { + int x = 10; + public int y = 2 * x; + }" + 'advanced + '("A a = new A();" "B b = new B();" "C c = new C();" "D d = new D();" "a.y" "b.report()" "c.y" "d.y") + '((void) (void) (void) (void) 20 20 20 20) + "Private, etc shouldn't effect order of evaluation") + (interact-test "public class X { private int x() { return 3; }