[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-scm
Subject:    [groovy-scm] [jira] Commented: (GRECLIPSE-700) Errors while reconciling
From:       "Andy Clement (JIRA)" <jira () codehaus ! org>
Date:       2010-04-30 20:50:13
Message-ID: 323637.10089.1272660613016.JavaMail.haus-jira () codehaus01 ! managed ! contegix ! com
[Download RAW message or body]


    [ http://jira.codehaus.org/browse/GRECLIPSE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219544#action_219544 \
] 

Andy Clement commented on GRECLIPSE-700:
----------------------------------------

appears to be a dodgy groovyc signature for the type variable reference.  I'd \
probably expect [TT; but it is '[T' - methinks groovy isn't treating that generic \
reference correctly.  Due to the length being 1 in the problem case, we treat it is \
as a primitive and that leads us to the NPE.

> Errors while reconciling
> ------------------------
> 
> Key: GRECLIPSE-700
> URL: http://jira.codehaus.org/browse/GRECLIPSE-700
> Project: GRECLIPSE
> Issue Type: Bug
> Components: Builder
> Affects Versions: 2.0.1Release
> Reporter: Andrew Eisenberg
> Assignee: Andy Clement
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
> 
> The following code has reconciling errors:
> {code}
> package p;
> import java.util.ArrayList;
> class A {
> Class<? extends A> class1= A.this.getClass();
> Class<? extends A> class2= A.class;
> Class<A> class3= (Class<A>) A.this.getClass();
> X<A> getX() {
> X<A> x= new X<A>();
> x.t= new ArrayList<A>().toArray(new A[0]);
> return x;
> }
> }
> class X<T extends A> {
> T[] t;
> }
> {code}
> The groovyc compiler on the command line shows the following errors:
> {code}
> $ groovyc p/A.groovy 
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> p/A.groovy: 6: The usage of '.this' and '.super' is only allowed in a inner class
> @ line 6, column 32.
> Class<? extends A> class1= A.this.getClass();
> ^
> p/A.groovy: 8: The usage of '.this' and '.super' is only allowed in a inner class
> @ line 8, column 33.
> Class<A> class3= (Class<A>) A.this.getClass();
> ^
> 2 errors
> {code}
> It would be nice if Eclipse could show these errors instead of barfing on \
> reconciling.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: \
                http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
    <a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic