Make vararg argument of java annotation have 'out' type

This commit is contained in:
Svetlana Isakova
2014-12-25 17:13:57 +03:00
parent d1556331ef
commit d2becce1ac
15 changed files with 94 additions and 46 deletions
@@ -257,13 +257,7 @@ public class AnnotationResolver {
}
});
JetType arrayType = KotlinBuiltIns.getInstance().getPrimitiveArrayJetTypeByPrimitiveJetType(varargElementType);
if (arrayType == null) {
arrayType = KotlinBuiltIns.getInstance().getArrayType(OUT_VARIANCE, varargElementType);
}
//todo use parameterDescriptor.getType() instead of arrayType
return new ArrayValue(constants, arrayType, true, usesVariableAsConstant);
return new ArrayValue(constants, parameterDescriptor.getType(), true, usesVariableAsConstant);
}
else {
// we should actually get only one element, but just in case of getting many, we take the last one