-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
In the following program:
public class A {
int o;
public static void main(String[] args) {
A x = new A();
A y = x;
x.o = 1;
y.o = 2;
System.out.println(x.o);
}
}slicing the x.o on the last line doesn't include the assignment to y.o:
public class A {
int o;
public static void main(String[] args) {
A x = new A();
x.o = 1;
System.out.println(x.o);
}
}The sliced program doesn't seem to behave the same as the original one.
I'm not sure if this is the intended behavior, could you explain a little? Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels