Supported nested reified parameter declarations
Also switched to using type names as identifiers instead of their indices
This commit is contained in:
@@ -442,4 +442,12 @@ public class DescriptorUtils {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static boolean containsReifiedTypeParameterWithName(@NotNull CallableDescriptor descriptor, @NotNull String name) {
|
||||
for (TypeParameterDescriptor typeParameterDescriptor : descriptor.getTypeParameters()) {
|
||||
if (typeParameterDescriptor.isReified() && typeParameterDescriptor.getName().asString().equals(name)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,19 +109,19 @@ public class Intrinsics {
|
||||
throw new UnsupportedOperationException("You should not use functions with reified parameter without inline");
|
||||
}
|
||||
|
||||
public static void reifyNewArray(int parameterTypeIndex) {
|
||||
public static void reifyNewArray(String typeParameterIdentifier) {
|
||||
throwUndefinedForReified();
|
||||
}
|
||||
|
||||
public static void reifyCheckcast(int parameterTypeIndex) {
|
||||
public static void reifyCheckcast(String typeParameterIdentifier) {
|
||||
throwUndefinedForReified();
|
||||
}
|
||||
|
||||
public static void reifyInstanceof(int parameterTypeIndex) {
|
||||
public static void reifyInstanceof(String typeParameterIdentifier) {
|
||||
throwUndefinedForReified();
|
||||
}
|
||||
|
||||
public static void reifyJavaClass(int parameterTypeIndex) {
|
||||
public static void reifyJavaClass(String typeParameterIdentifier) {
|
||||
throwUndefinedForReified();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user