[ 
https://issues.apache.org/jira/browse/GROOVY-8345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16194933#comment-16194933
 ] 

Paul King commented on GROOVY-8345:
-----------------------------------

I haven't had time to look at your example yet but I noticed you used the indy 
jar. Is the issue specific to that variant or does the non-indy jar behave in 
the same way?

> Exception in phase 'semantic analysis'
> --------------------------------------
>
>                 Key: GROOVY-8345
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8345
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.12
>         Environment: Java8, Windows
>            Reporter: John
>         Attachments: setup.zip
>
>
> Hi,
> I get this error when I run ant target below:
> {code}
> BUG! exception in phase 'semantic analysis' in source unit '....\test.groovy' 
> The lookup for two.bar caused a failed compilaton. There should not have
> been any compilation from this call.
>         at 
> org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:190)
>               ....
> {code}
> I don't get the error if I run the script via cmdline: 
> {{groovy-2.4.12/bin/groovy -cp . test.groovy}}
> h4. Setup:
> {code}build.xml
> test.groovy
> one/foo.groovy
> two/bar.groovy
> groovy-all-2.4.12-indy.jar{code}
> {{build.xml:}}{code}
> <project>
>     <taskdef resource="org/codehaus/groovy/antlib.xml">
>         <classpath>
>             <pathelement location="groovy-all-2.4.12-indy.jar"/>
>         </classpath>
>     </taskdef>
>     <target name="test">
>         <groovy src="test.groovy"/>
>     </target>
> </project>{code}
> {{test.groovy:}}{code}
> import one.foo
> import two.bar
> bar.run()
> {code}
> {{one/foo.groovy:}}{code}
> package one
> class foo {
> }
> class foobar {
>     foobar() {
>         println("foobar")
>     }
> }{code}
> {{two/bar.groovy:}}{code}
> package two
> import one.foobar
> class bar {
>     static def run() {
>         new foobar()
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to