-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
mantis
-
generic
-
solaris_8
frog:~/workspaces/test/Generic16 $ cat -n Case.java
1 import java.util.Stack;
2 public class Case
3 {
4 public static void main(String[] argv)
5 {
6 Stack<String> bar = new Stack<String>();
7 String foo;
8
9 // Compiles, but causes verify error
10 foo=(bar.empty()?"":bar.peek()).intern();
11
12 // The following two work fine
13 foo = (bar.empty()?"":bar.peek().intern());
14 foo = (bar.empty()?"":(String)bar.peek()).intern();
15 }
16 }
frog:~/workspaces/test/Generic16 $ newjavac -gj Case.java
frog:~/workspaces/test/Generic16 $ newjava Case
+ /java/re/j2se/1.4.1/promoted/latest/binaries/solaris-sparc/bin/java -Xfuture Case
Exception in thread "main" java.lang.VerifyError: (class: Case, method: main signature: ([Ljava/lang/String;)V) Incompatible object argument for function call
frog:~/workspaces/test/Generic16 $
1 import java.util.Stack;
2 public class Case
3 {
4 public static void main(String[] argv)
5 {
6 Stack<String> bar = new Stack<String>();
7 String foo;
8
9 // Compiles, but causes verify error
10 foo=(bar.empty()?"":bar.peek()).intern();
11
12 // The following two work fine
13 foo = (bar.empty()?"":bar.peek().intern());
14 foo = (bar.empty()?"":(String)bar.peek()).intern();
15 }
16 }
frog:~/workspaces/test/Generic16 $ newjavac -gj Case.java
frog:~/workspaces/test/Generic16 $ newjava Case
+ /java/re/j2se/1.4.1/promoted/latest/binaries/solaris-sparc/bin/java -Xfuture Case
Exception in thread "main" java.lang.VerifyError: (class: Case, method: main signature: ([Ljava/lang/String;)V) Incompatible object argument for function call
frog:~/workspaces/test/Generic16 $