No more reified types for catch parameter #KT-9742 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-11-27 18:23:47 +03:00
parent f0e467e474
commit c6be69a483
7 changed files with 63 additions and 5 deletions
@@ -497,6 +497,11 @@ public class TypeUtils {
return typeParameterDescriptor != null && !typeParameterDescriptor.isReified();
}
public static boolean isReifiedTypeParameter(@NotNull KotlinType type) {
TypeParameterDescriptor typeParameterDescriptor = getTypeParameterDescriptorOrNull(type);
return typeParameterDescriptor != null && typeParameterDescriptor.isReified();
}
@Nullable
public static TypeParameterDescriptor getTypeParameterDescriptorOrNull(@NotNull KotlinType type) {
if (type.getConstructor().getDeclarationDescriptor() instanceof TypeParameterDescriptor) {