Supported nested reified parameter declarations

Also switched to using type names as identifiers instead of their
indices
This commit is contained in:
Denis Zharkov
2014-11-21 12:07:08 +04:00
parent 080610c208
commit 3b2d0b88f3
15 changed files with 310 additions and 100 deletions
@@ -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();
}