JShell API: method cannot call method with different number of arguments.
-> void f() { f(10); }
| Error:
| method f in class cannot be applied to given types;
| required: no arguments
| found: int
| reason: actual and formal argument lists differ in length
| void f() { f(10); }
|
-Andrei
This is true even if the other version is already defined.
-> int f(int x) { return x; }
| Added method f(int)
-> void f() { f(10); }
| Error:
| method f in class cannot be applied to given types;
| required: no arguments
| found: int
| reason: actual and formal argument lists differ in length
| void f() { f(10); }
| ^
-Robert
-> void f() { f(10); }
| Error:
| method f in class cannot be applied to given types;
| required: no arguments
| found: int
| reason: actual and formal argument lists differ in length
| void f() { f(10); }
|
-Andrei
This is true even if the other version is already defined.
-> int f(int x) { return x; }
| Added method f(int)
-> void f() { f(10); }
| Error:
| method f in class cannot be applied to given types;
| required: no arguments
| found: int
| reason: actual and formal argument lists differ in length
| void f() { f(10); }
| ^
-Robert
- is blocked by
-
JDK-8152925 JShell: enable corralling of any type declaration, including enum
- Closed
-
JDK-8154485 JShell: infrastructure for multi-Snippet class wrappers
- Closed
-
JDK-8080069 JShell: Support for corralled classes
- Closed
- relates to
-
JDK-8187137 JShell: user method fails when name matches method in Object.
- Closed