Skip to content

Commit cc78f68

Browse files
committed
bug fix
1 parent 4b1c017 commit cc78f68

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/kotlin/org/tabooproject/development/completion/ReflectMethodReflectCompletion.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,8 @@ object GetPropertyReflectCompletionProvider : CompletionProvider<CompletionParam
9898

9999
val returnTypeElement = field.type
100100
// 导入包
101-
val primitiveType = PsiTypes.primitiveTypes().firstOrNull {
102-
it == returnTypeElement
103-
}
104-
if (primitiveType != null && returnTypeElement.canonicalText != "java.lang.String") {
101+
val primitiveType = returnTypeElement as? PsiPrimitiveType
102+
if (primitiveType == null && returnTypeElement.canonicalText != "java.lang.String") {
105103
ktFile.checkAndImportPackage(returnTypeElement.canonicalText)
106104
}
107105
val shortName = if (primitiveType != null) {

0 commit comments

Comments
 (0)