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:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user