From 646d2fbd2a0d1e898a14ac942c43511bfd0a1c95 Mon Sep 17 00:00:00 2001 From: Błażej Kardyś Date: Tue, 24 Mar 2020 05:04:10 +0100 Subject: Fixing incorrect psi parsing --- core/src/main/kotlin/links/DRI.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/src/main/kotlin/links') diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt index cc78ab6f..abc88939 100644 --- a/core/src/main/kotlin/links/DRI.kt +++ b/core/src/main/kotlin/links/DRI.kt @@ -57,6 +57,7 @@ data class DRI( } val DriOfUnit = DRI("kotlin", "Unit") +val DriOfAny = DRI("kotlin", "Any") fun DRI.withClass(name: String) = copy(classNames = if (classNames.isNullOrBlank()) name else "$classNames.$name") @@ -111,6 +112,8 @@ sealed class TypeReference { fun from(d: ValueParameterDescriptor): TypeReference? = fromPossiblyNullable(d.type) + fun from(p: PsiClass) = TypeReference + private fun fromPossiblyNullable(t: KotlinType, self: KotlinType? = null): TypeReference = from(t, self).let { if (t.isMarkedNullable) Nullable(it) else it } @@ -127,7 +130,6 @@ sealed class TypeReference { ) } - private fun fromProjection(t: TypeProjection, r: KotlinType? = null): TypeReference = if (t.isStarProjection) { StarProjection -- cgit