Bug: problems with forward methods
andrei.eremeev
andrei.eremeev at oracle.com
Thu Mar 19 16:13:38 UTC 2015
And as for forward variables, I think method "f" can be declared, but
cannot be executed until "a" with a proper type is declared.
-> double a
| Added variable a of type double
-> int f() { return a; }
| Error:
| incompatible types: possible lossy conversion from double to int
| int f() { return a; }
| ^
-> int a
| Replaced variable a of type int
Andrei Eremeev
On 03/19/2015 06:49 PM, andrei.eremeev wrote:
> Hi REPL team,
>
> The code is not compiled if the name of a forward method equals to the
> method name in which the forward method is called.
>
> -> 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 Eremeev
More information about the kulla-dev
mailing list