Community
Participate
Working Groups
Here is an example of a simple team class: public team class T { public class R playedBy A {} } A cast like the following (although it is needless here) will result in errors "Cannot cast from R<@t> to R<@t> []" and "Type mismatch: cannot convert from R<@t> [] to R<@t>". A a = new A(); final T t = new T(); R<@t> r = (R<@t>) t.getRole(a, R<@t>.class); I would expect this cast to be correct.
Strange indeed. Something's broken with the array dimensions. I'll take a look.
Created attachment 199611 [details] test & fix The role class literal was not correctly parsed: some source positions were not consumed from the intStack and were subsequently interpreted as array dimensions leading to random results. Fixed by the attached patch.
released for 2.0.1
Verified for 2.0.1 using build 201108160141.
Marking IP log for contributed test case in comment 0.