groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Schalk Cronjé <ysb...@gmail.com>
Subject Re: Internal compiler error when using for loop on a collection.
Date Tue, 27 Oct 2015 18:23:39 GMT
To add a note to this. The exception does not occur when using .each on 
the collection.

On 27/10/2015 17:32, Schalk Cronjé wrote:
> I appreciate this might be hard to provide info on without the lack of 
> source code to look at, but I have not been able to distill this down 
> to a simplified case. I am still working on a piece of new code for 
> Groovy-VFS so have not even pushed it upstream yet. However this 
> compilation error has caught me out.
>
> Maybe one of the Groovy Devs might have a clue as to what can cause 
> this kind of error.
>
> General error during class generation: Internal compiler error while 
> compiling **/**/UpToDateCheck.groovy
> Method: MethodNode@1811575933[boolean 
> forUriCollection(org.gradle.api.logging.Logger, 
> org.ysb33r.groovy.dsl.vfs.VFS, org.ysb33r.gradle.vfs.VfsURICollection, 
> java.lang.Object)]
> Line 35, expecting casting to java.util.Iterator <E extends 
> java.lang.Object> but operand stack is empty
>
> java.lang.ArrayIndexOutOfBoundsException: Internal compiler error 
> while compiling **/**/UpToDateCheck.groovy
> Method: MethodNode@1811575933[boolean 
> forUriCollection(org.gradle.api.logging.Logger, 
> org.ysb33r.groovy.dsl.vfs.VFS, org.ysb33r.gradle.vfs.VfsURICollection, 
> java.lang.Object)]
> Line 35, expecting casting to java.util.Iterator <E extends 
> java.lang.Object> but operand stack is empty
>     at 
> org.codehaus.groovy.classgen.asm.OperandStack.throwExceptionForNoStackElement(OperandStack.java:310)
>     at 
> org.codehaus.groovy.classgen.asm.OperandStack.doConvertAndCast(OperandStack.java:315)
>     at 
> org.codehaus.groovy.classgen.asm.OperandStack.doGroovyCast(OperandStack.java:279)
>     at 
> org.codehaus.groovy.classgen.asm.OperandStack.storeVar(OperandStack.java:629)
>     at 
> org.codehaus.groovy.classgen.asm.CompileStack.defineTemporaryVariable(CompileStack.java:308)
>     at 
> org.codehaus.groovy.classgen.asm.sc.StaticTypesStatementWriter.writeForInLoop(StaticTypesStatementWriter.java:85)
>
> It seems to be related to a for-loop over an internal Groovy VFS class 
> that implements the Iterable interface.
>
> The version of Groovy would be 2.3.3.
>


-- 
Schalk W. Cronjé
Twitter / Ello / Toeter : @ysb33r


Mime
View raw message