Skip to content

Commit 4222a94

Browse files
Regression tests for unstable instanceof and virtual method disjuncts
1 parent b44589e commit 4222a94

File tree

10 files changed

+100
-0
lines changed

10 files changed

+100
-0
lines changed
1.16 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class A {
2+
}
3+
4+
class B extends A {
5+
}
6+
7+
public class Test {
8+
9+
public boolean foo(A x) {
10+
if (x instanceof A) {
11+
return true;
12+
} else {
13+
return false;
14+
}
15+
}
16+
}
1.15 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
old.jar needs to be created by first adding B.class and Test.class and then
3+
updated to add A.class. This makes the class loader load the classes A and B
4+
in reverse order.
5+
*/
6+
7+
class A {
8+
}
9+
10+
class B extends A {
11+
}
12+
13+
public class Test {
14+
15+
public boolean foo(A x) {
16+
if (x instanceof A) {
17+
return true;
18+
} else {
19+
return false;
20+
}
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
new.jar
3+
old.jar
4+
// Enable multi-line checking
5+
activate-multi-line-match
6+
EXIT=0
7+
SIGNAL=0
8+
new functions:\nmodified functions:\ndeleted functions:
9+
--
10+
^warning: ignoring
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class A {
2+
boolean bar() {
3+
return true;
4+
}
5+
}
6+
7+
class B extends A {
8+
boolean bar() {
9+
return false;
10+
}
11+
}
12+
13+
public class Test {
14+
15+
public boolean foo(A x) {
16+
return x.bar();
17+
}
18+
}
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
old.jar needs to be created by first adding B.class and Test.class and then
3+
updated to add A.class. This makes the class loader load the classes A and B
4+
in reverse order.
5+
*/
6+
7+
class A {
8+
boolean bar() {
9+
return true;
10+
}
11+
}
12+
13+
class B extends A {
14+
boolean bar() {
15+
return false;
16+
}
17+
}
18+
19+
public class Test {
20+
21+
public boolean foo(A x) {
22+
return x.bar();
23+
}
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
new.jar
3+
old.jar
4+
// Enable multi-line checking
5+
activate-multi-line-match
6+
EXIT=0
7+
SIGNAL=0
8+
new functions:\nmodified functions:\ndeleted functions:
9+
--
10+
^warning: ignoring

0 commit comments

Comments
 (0)