Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-beta-2
-
Fix Version/s: 2.0-beta-3
-
Component/s: Static Type Checker
-
Labels:None
-
Number of attachments :
Description
If a class contains a field declared as a closure and that you use that closure as a method, the type checker throws a missing method error.
class FibUtil {
private Closure<Integer> fibo
FibUtil() {
fibo = { int x-> x<1?x:fibo(x-1)+fibo(x-2) }
}
int fib(int n) { fibo(n) }
}