Typecheck instructions are supported for reified T
This commit is contained in:
committed by
Andrey Breslav
parent
416ac7917b
commit
f3c49c605f
@@ -724,6 +724,11 @@ public class TypeUtils {
|
||||
return getTypeParameterDescriptorOrNull(type) != null;
|
||||
}
|
||||
|
||||
public static boolean isNonReifiedTypeParemeter(@NotNull JetType type) {
|
||||
TypeParameterDescriptor typeParameterDescriptor = getTypeParameterDescriptorOrNull(type);
|
||||
return typeParameterDescriptor != null && !typeParameterDescriptor.isReified();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static TypeParameterDescriptor getTypeParameterDescriptorOrNull(@NotNull JetType type) {
|
||||
if (type.getConstructor().getDeclarationDescriptor() instanceof TypeParameterDescriptor) {
|
||||
|
||||
@@ -110,6 +110,14 @@ public class Intrinsics {
|
||||
throwUndefinedForReified();
|
||||
}
|
||||
|
||||
public static void reifyCheckcast(int parameterTypeIndex) {
|
||||
throwUndefinedForReified();
|
||||
}
|
||||
|
||||
public static void reifyInstanceof(int parameterTypeIndex) {
|
||||
throwUndefinedForReified();
|
||||
}
|
||||
|
||||
public static <T extends Throwable> T sanitizeStackTrace(T throwable) {
|
||||
StackTraceElement[] stackTrace = throwable.getStackTrace();
|
||||
ArrayList<StackTraceElement> list = new ArrayList<StackTraceElement>(stackTrace.length);
|
||||
|
||||
Reference in New Issue
Block a user