Fix "Placing function type parameters after the function name" errors in project
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ public class HierarchySearchRequest<T: PsiElement> (
|
||||
override val searchScope: SearchScope,
|
||||
val searchDeeply: Boolean = true
|
||||
) : SearchRequestWithElement<T> {
|
||||
fun copy<U: PsiElement>(newOriginalElement: U): HierarchySearchRequest<U> =
|
||||
fun <U: PsiElement> copy(newOriginalElement: U): HierarchySearchRequest<U> =
|
||||
HierarchySearchRequest(newOriginalElement, searchScope, searchDeeply)
|
||||
}
|
||||
|
||||
|
||||
@@ -21,14 +21,14 @@ import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinCallableStubBase
|
||||
import org.jetbrains.kotlin.util.aliasImportMap
|
||||
|
||||
fun indexTopLevelExtension<TDeclaration : KtCallableDeclaration>(stub: KotlinCallableStubBase<TDeclaration>, sink: IndexSink) {
|
||||
fun <TDeclaration : KtCallableDeclaration> indexTopLevelExtension(stub: KotlinCallableStubBase<TDeclaration>, sink: IndexSink) {
|
||||
if (stub.isExtension()) {
|
||||
val declaration = stub.getPsi()
|
||||
declaration.getReceiverTypeReference()!!.typeElement?.index(declaration, sink)
|
||||
}
|
||||
}
|
||||
|
||||
private fun KtTypeElement.index<TDeclaration : KtCallableDeclaration>(declaration: TDeclaration, sink: IndexSink) {
|
||||
private fun <TDeclaration : KtCallableDeclaration> KtTypeElement.index(declaration: TDeclaration, sink: IndexSink) {
|
||||
fun occurrence(typeName: String) {
|
||||
val name = declaration.getName() ?: return
|
||||
sink.occurrence(KotlinTopLevelExtensionsByReceiverTypeIndex.INSTANCE.getKey(),
|
||||
|
||||
@@ -21,11 +21,11 @@ import com.intellij.openapi.command.CommandProcessor
|
||||
import com.intellij.openapi.project.DumbService
|
||||
import com.intellij.openapi.project.Project
|
||||
|
||||
public fun runReadAction<T>(action: () -> T): T {
|
||||
public fun <T> runReadAction(action: () -> T): T {
|
||||
return ApplicationManager.getApplication().runReadAction<T>(action)
|
||||
}
|
||||
|
||||
public fun runWriteAction<T>(action: () -> T): T {
|
||||
public fun <T> runWriteAction(action: () -> T): T {
|
||||
return ApplicationManager.getApplication().runWriteAction<T>(action)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user