diff --git a/idea/src/org/jetbrains/jet/plugin/completion/LookupElementFactory.kt b/idea/src/org/jetbrains/jet/plugin/completion/LookupElementFactory.kt index d1f1b1e6cc9..71d0f2cab86 100644 --- a/idea/src/org/jetbrains/jet/plugin/completion/LookupElementFactory.kt +++ b/idea/src/org/jetbrains/jet/plugin/completion/LookupElementFactory.kt @@ -207,7 +207,7 @@ public class LookupElementFactory( if (receiverTypes == null) return null if (descriptor !is CallableMemberDescriptor) return null - val isReceiverNullable = receiverTypes.all { it.isNullable() } + val isReceiverNullable = receiverTypes.isNotEmpty() && receiverTypes.all { it.isNullable() } val receiverParameter = descriptor.getExtensionReceiverParameter() if (receiverParameter != null) { diff --git a/idea/testData/completion/basic/common/InGlobalPropertyInitializer.kt b/idea/testData/completion/basic/common/InGlobalPropertyInitializer.kt index 19d6982ba03..90a7785e752 100644 --- a/idea/testData/completion/basic/common/InGlobalPropertyInitializer.kt +++ b/idea/testData/completion/basic/common/InGlobalPropertyInitializer.kt @@ -3,4 +3,5 @@ val test = "Hello" val more = test -// EXIST: test, testing +// EXIST: { lookupString: "test", itemText: "test", tailText: " ()", typeText: "String", attributes: "" } +// EXIST: { lookupString: "testing", itemText: "testing", tailText: " ()", typeText: "Int", attributes: "" }