Allow assigning array to vararg in named form in annotations
See more in KT-20171
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -866,6 +866,10 @@ public abstract class KotlinBuiltIns {
|
||||
return classFqNameEquals(descriptor, FQ_NAMES.array) || getPrimitiveArrayType(descriptor) != null;
|
||||
}
|
||||
|
||||
public static boolean isArrayOrPrimitiveArray(@NotNull KotlinType type) {
|
||||
return isArray(type) || isPrimitiveArray(type);
|
||||
}
|
||||
|
||||
public static boolean isPrimitiveArray(@NotNull KotlinType type) {
|
||||
ClassifierDescriptor descriptor = type.getConstructor().getDeclarationDescriptor();
|
||||
return descriptor != null && getPrimitiveArrayType(descriptor) != null;
|
||||
|
||||
Reference in New Issue
Block a user