[SLC] implement missing accept for SymbolLightParameterList and SymbolLightModifierList
This commit is contained in:
committed by
Space Team
parent
a05842400c
commit
5a081e8291
+9
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -56,6 +56,14 @@ internal sealed class SymbolLightModifierList<out T : KtLightElement<KtModifierL
|
||||
this.staticModifiers = staticModifiers
|
||||
}
|
||||
|
||||
override fun accept(visitor: PsiElementVisitor) {
|
||||
if (visitor is JavaElementVisitor) {
|
||||
visitor.visitModifierList(this)
|
||||
} else {
|
||||
visitor.visitElement(this)
|
||||
}
|
||||
}
|
||||
|
||||
override val kotlinOrigin: KtModifierList? get() = owner.kotlinOrigin?.modifierList
|
||||
override fun getParent() = owner
|
||||
override fun setModifierProperty(name: String, value: Boolean) = cannotModify()
|
||||
|
||||
+11
-1
@@ -1,10 +1,12 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.light.classes.symbol.parameters
|
||||
|
||||
import com.intellij.psi.JavaElementVisitor
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import com.intellij.psi.PsiParameter
|
||||
import com.intellij.psi.PsiParameterList
|
||||
import com.intellij.psi.impl.light.LightParameterListBuilder
|
||||
@@ -44,6 +46,14 @@ internal class SymbolLightParameterList(
|
||||
builder
|
||||
}
|
||||
|
||||
override fun accept(visitor: PsiElementVisitor) {
|
||||
if (visitor is JavaElementVisitor) {
|
||||
visitor.visitParameterList(this)
|
||||
} else {
|
||||
visitor.visitElement(this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getParameter(index: Int): PsiParameter? = clsDelegate.getParameter(index)
|
||||
override fun getParameters(): Array<PsiParameter> = clsDelegate.parameters
|
||||
override fun getParameterIndex(p: PsiParameter): Int = clsDelegate.getParameterIndex(p)
|
||||
|
||||
Reference in New Issue
Block a user