KT-1838 Constructor with a vararg

Resolution for properties declared as primary constructor parameters used to ignore the varargs annotation.
 #KT-1838 Fixed
This commit is contained in:
Andrey Breslav
2012-04-23 14:16:07 +04:00
parent 32a55f786c
commit 789ff0b273
3 changed files with 13 additions and 0 deletions
@@ -431,6 +431,9 @@ public class DescriptorResolver {
// Error is reported by the parser
type = ErrorUtils.createErrorType("Annotation is absent");
}
if (parameter.hasModifier(JetTokens.VARARG_KEYWORD)) {
return getVarargParameterType(type);
}
return type;
}
@@ -0,0 +1,5 @@
class A(vararg t : Int) {
{
val t1 : IntArray = t
}
}
@@ -0,0 +1,5 @@
class A(vararg val t : Int) {
{
val t1 : IntArray = t
}
}