Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.3.7, 2.5.0-alpha-1, 2.4.10, 3.0.4
-
None
-
None
-
Windows 7
Description
See the following script with a Syntax error (unbalanced parentheses), which repeatedly uses the subscript operator to set something on an object which has the putAt method defined:
class A { void putAt(key, value) { // whatever } } def a = new A() a[1] = ( a[2] = 2 a[3] = 3 a[4] = 4 a[5] = 5 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0 a[1] = 0
Expected: The compiler returns with a syntax error.
Observed: The script takes very long (in the order of minutes) to compile. If it is shortened (remove some of the assignments), at some point it compiles within reasonable time (< 1 Minute), but still slow. The syntax error is reported correctly.