-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b157
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8175671 | 10 | Robert Field | P2 | Resolved | Fixed | b02 |
[unfortunately JBS isn't showing indenting]
jshell> double m(int x) { return x; }
| created method m(int)
jshell> GARBAGE junk() { return TRASH; }
| created method junk(), however, it cannot be referenced until class GARBAGE, and variable TRASH are declared
jshell> int w = 5;
w ==> 5
jshell> int tyer() { return w; }
| created method tyer()
jshell> String w = "hi";
w ==> "hi"
jshell> /methods
| m (int)double
| junk ()GARBAGE
| tyer ()int
jshell> tyer()
| attempted to call method tyer() which cannot be invoked until this error is corrected:
| incompatible types: java.lang.String cannot be converted to int
| int tyer() { return w; }
| ^
jshell> junk()
| Error:
| cannot find symbol
| symbol: method junk()
| junk()
| ^--^
---------------------------------- Desired Output ------------------------
jshell> /methods
| double m(int)
| GARBAGE junk()
| which cannot be referenced until class GARBAGE, and variable TRASH are declared
| int tyer()
| which cannot be invoked until this error is corrected:
| incompatible types: java.lang.String cannot be converted to int
| int tyer() { return w; }
| ^
jshell> double m(int x) { return x; }
| created method m(int)
jshell> GARBAGE junk() { return TRASH; }
| created method junk(), however, it cannot be referenced until class GARBAGE, and variable TRASH are declared
jshell> int w = 5;
w ==> 5
jshell> int tyer() { return w; }
| created method tyer()
jshell> String w = "hi";
w ==> "hi"
jshell> /methods
| m (int)double
| junk ()GARBAGE
| tyer ()int
jshell> tyer()
| attempted to call method tyer() which cannot be invoked until this error is corrected:
| incompatible types: java.lang.String cannot be converted to int
| int tyer() { return w; }
| ^
jshell> junk()
| Error:
| cannot find symbol
| symbol: method junk()
| junk()
| ^--^
---------------------------------- Desired Output ------------------------
jshell> /methods
| double m(int)
| GARBAGE junk()
| which cannot be referenced until class GARBAGE, and variable TRASH are declared
| int tyer()
| which cannot be invoked until this error is corrected:
| incompatible types: java.lang.String cannot be converted to int
| int tyer() { return w; }
| ^
- backported by
-
JDK-8175671 jshell tool: /method /type failed declaration listed (without indication)
-
- Resolved
-