synchronized (buildingTypeLock) {
if (ty.isArray()) {
ResolvedType componentType = resolve(ty.getComponentType(), allowMissing);
+ if (componentType.isVoid()) {
+ if (isInJava5Mode() && getLint().adviceDidNotMatch.isEnabled()) {
+ getLint().arrayCannotBeVoid.signal(ty.toString(), null);
+ }
+ ret = new MissingResolvedTypeWithKnownSignature(signature, this);
+ }
+ else {
ret = new ArrayReferenceType(signature, "[" + componentType.getErasureSignature(), this, componentType);
+ }
} else {
ret = resolveToReferenceType(ty, allowMissing);
if (!allowMissing && ret.isMissing()) {
ResolvedType[] primitives = world.resolve(primitiveTypes);
for (ResolvedType ty : primitives) {
UnresolvedType tx = UnresolvedType.forSignature("[" + ty.getSignature());
+ // 'void[]' is an illegal type -> skip
+ if (tx.getSignature().equals("[V"))
+ continue;
ResolvedType aty = world.resolve(tx, true);
assertTrue("Couldnt find type " + tx, !aty.isMissing());
modifiersTest(aty, Modifier.PUBLIC | Modifier.FINAL);
for (ResolvedType ty1 : primitives) {
isCoerceableFromTest(aty, ty1, false);
tx = UnresolvedType.forSignature("[" + ty1.getSignature());
+ // 'void[]' is an illegal type -> skip
+ if (tx.getSignature().equals("[V"))
+ continue;
ResolvedType aty1 = getWorld().resolve(tx, true);
assertTrue("Couldnt find type " + tx, !aty1.isMissing());
if (ty.equals(ty1)) {
// double dimension arrays
for (ResolvedType ty : primitives) {
UnresolvedType tx = UnresolvedType.forSignature("[[" + ty.getSignature());
+ // 'void[][]' is an illegal type -> skip
+ if (tx.getSignature().equals("[[V"))
+ continue;
ResolvedType aty = world.resolve(tx, true);
assertTrue("Couldnt find type " + tx, !aty.isMissing());
modifiersTest(aty, Modifier.PUBLIC | Modifier.FINAL);
for (ResolvedType ty1 : primitives) {
isCoerceableFromTest(aty, ty1, false);
tx = UnresolvedType.forSignature("[[" + ty1.getSignature());
+ // 'void[][]' is an illegal type -> skip
+ if (tx.getSignature().equals("[[V"))
+ continue;
ResolvedType aty1 = getWorld().resolve(tx, true);
assertTrue("Couldnt find type " + tx, !aty1.isMissing());
if (ty.equals(ty1)) {