Don't show types for enum entries with enum name is present in initializer (KT-26057)

#KT-26057 Fixed
This commit is contained in:
Nikolay Krasko
2018-09-06 12:27:58 +03:00
parent ab3f8db743
commit 307586e435
3 changed files with 105 additions and 21 deletions
@@ -77,6 +77,7 @@ fun KotlinType.isPrimitiveNumberOrNullableType(): Boolean =
fun KotlinType.isTypeParameter(): Boolean = TypeUtils.isTypeParameter(this)
fun KotlinType.isInterface(): Boolean = (constructor.declarationDescriptor as? ClassDescriptor)?.kind == ClassKind.INTERFACE
fun KotlinType.isEnum(): Boolean = (constructor.declarationDescriptor as? ClassDescriptor)?.kind == ClassKind.ENUM_CLASS
fun KotlinType?.isArrayOfNothing(): Boolean {
if (this == null || !KotlinBuiltIns.isArray(this)) return false