Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent class reload does not change child class parent #697

Open
Tracked by #694
nickl- opened this issue Jan 12, 2023 · 0 comments
Open
Tracked by #694

Parent class reload does not change child class parent #697

nickl- opened this issue Jan 12, 2023 · 0 comments
Labels

Comments

@nickl-
Copy link
Member

nickl- commented Jan 12, 2023

TODO: parent class reload does not change child class parent

BeanShell 3.0.0-SNAPSHOT.3665
class A {
    int get() {
        return 1;
    }
}
--> $0 = class A :Class
new A().get();
--> $1 = 1I :int
class B extends A { }
--> $2 = class B :Class
new B().get();
--> $3 = 1I :int
class A {
    int get() {
        return 2;
    }
}
--> $4 = class A :Class
new A().get();
--> $5 = 2I :int
new B().get();
--> $6 = 1I :int
A.class == B.class.getSuperclass();  // this should be true
--> $7 = false :boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant