"class" and "class.java" should be available after expression too
This commit is contained in:
@@ -35,7 +35,6 @@ import org.jetbrains.kotlin.resolve.BindingContext
|
|||||||
import org.jetbrains.kotlin.types.KotlinTypeFactory
|
import org.jetbrains.kotlin.types.KotlinTypeFactory
|
||||||
import org.jetbrains.kotlin.types.TypeProjectionImpl
|
import org.jetbrains.kotlin.types.TypeProjectionImpl
|
||||||
import org.jetbrains.kotlin.types.TypeSubstitutor
|
import org.jetbrains.kotlin.types.TypeSubstitutor
|
||||||
import org.jetbrains.kotlin.types.expressions.DoubleColonLHS
|
|
||||||
import org.jetbrains.kotlin.types.typeUtil.isBooleanOrNullableBoolean
|
import org.jetbrains.kotlin.types.typeUtil.isBooleanOrNullableBoolean
|
||||||
|
|
||||||
object KeywordValues {
|
object KeywordValues {
|
||||||
@@ -95,9 +94,7 @@ object KeywordValues {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (callTypeAndReceiver is CallTypeAndReceiver.CALLABLE_REFERENCE && callTypeAndReceiver.receiver != null) {
|
if (callTypeAndReceiver is CallTypeAndReceiver.CALLABLE_REFERENCE && callTypeAndReceiver.receiver != null) {
|
||||||
val receiverExpression = callTypeAndReceiver.receiver!!
|
val qualifierType = bindingContext.get(BindingContext.DOUBLE_COLON_LHS, callTypeAndReceiver.receiver!!)?.type
|
||||||
val qualifierType = (bindingContext.get(BindingContext.DOUBLE_COLON_LHS, receiverExpression) as? DoubleColonLHS.Type)?.type
|
|
||||||
|
|
||||||
if (qualifierType != null) {
|
if (qualifierType != null) {
|
||||||
val kClassDescriptor = resolutionFacade.getFrontendService(ReflectionTypes::class.java).kClass
|
val kClassDescriptor = resolutionFacade.getFrontendService(ReflectionTypes::class.java).kClass
|
||||||
val classLiteralType = KotlinTypeFactory.simpleNotNullType(Annotations.EMPTY, kClassDescriptor, listOf(TypeProjectionImpl(qualifierType)))
|
val classLiteralType = KotlinTypeFactory.simpleNotNullType(Annotations.EMPTY, kClassDescriptor, listOf(TypeProjectionImpl(qualifierType)))
|
||||||
|
|||||||
+2
-2
@@ -49,8 +49,8 @@ class C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ABSENT: class
|
// EXIST: class
|
||||||
// ABSENT: class.java
|
// EXIST_JAVA_ONLY: class.java
|
||||||
// EXIST: { itemText: "memberFunInA", attributes: "" }
|
// EXIST: { itemText: "memberFunInA", attributes: "" }
|
||||||
// EXIST: { itemText: "memberValInA", attributes: "" }
|
// EXIST: { itemText: "memberValInA", attributes: "" }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user