Community
Participate
Working Groups
The following series of classes produce an error (The constructor B<Z>(Z, D<Y>) is undefined) in the 'test' method of the 'C' class. There appears to be some problem with multi level generics. public class D<Y>{} public class B<X>{ public B(X str,D dValue){} } public class C<Z,Y> { public B<Z> test(Z zValue,D<Y> yValue){ return new B<Z>(zValue,yValue); } } This appears to work with IntelliJ 4.5
This case works if all the types are compiled from source but fails if B is picked up as .class file. ParameterizedTypeBinding.isEquivalentTo does not accept BinaryTypeBindings... just RawTypeBindings.
Building on Kents comment, the temporary work around to this bug is to clean the project and then rebuild it. Trying this approach out on both the example outlined and the original, more complex code, seems to do the trick. I知 interested in helping resolve this bug if possible
Philippe: double check the fix to BinaryTypeBinding.
Fix looks good (matching unresolved scenario). Added GenericTypeTests#test293.
.
Verified for 3.1 M2 with build I200409231635.