Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
-
None
-
None
-
Debian Sid (aka Unstable), Groovy master 48b650edd3473cdcfe8b1f11667f005bd2bbaf92 using indy artefacts.
Description
The code:
@TailRecursive private static BigInteger iterate(final BigInteger i, final BigInteger a, final BigInteger b) { i < 1 ? a : iterate(i - 1, b, a + b) }
compiles and works fine with the @TailRecursive commented out. With it in place:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: file:/home/users/russel/Progs/Applications/Fibonacci/Groovy/Fibonacci.groovy: 43: Apparent variable '__b__' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes: You attempted to reference a variable in the binding or an instance variable from a static context. You misspelled a classname or statically imported field. Please check the spelling. You attempted to use a method '__b__' but left out brackets in a place not allowed by the grammar. @ line 43, column 32. i < 1 ? a : iterate(i - 1, b, a + b) ^ 1 error