-
Bug
-
Resolution: Unresolved
-
P4
-
10
bitter_fox@bitterfox-MacBookPro% ~/bin/jdk-10/bin/jshell -J-Duser.language=en
| Welcome to JShell -- Version 10
| For an introduction type: /help intro
jshell> <Z extends Runnable & CharSequence> Z get1() { return null; }
| created method get1()
jshell> var z = get1()
z ==> null
jshell> z.run()
| java.lang.NoSuchFieldError thrown: z
| at (#3:1)
jshell> void m() {z.run();}
| created method m()
jshell> m()
| java.lang.NoSuchFieldError thrown: z
| at m (#4:1)
| at (#5:1)
jshell>
Examples above are based on VariablesTest#lvti, but the testing is not completeness.
| Welcome to JShell -- Version 10
| For an introduction type: /help intro
jshell> <Z extends Runnable & CharSequence> Z get1() { return null; }
| created method get1()
jshell> var z = get1()
z ==> null
jshell> z.run()
| java.lang.NoSuchFieldError thrown: z
| at (#3:1)
jshell> void m() {z.run();}
| created method m()
jshell> m()
| java.lang.NoSuchFieldError thrown: z
| at m (#4:1)
| at (#5:1)
jshell>
Examples above are based on VariablesTest#lvti, but the testing is not completeness.
- relates to
-
JDK-8191842 JShell: Inferred type information is lost when assigning types to a "var"
- Resolved