Skip to content

Commit d0ab2de

Browse files
committed
fix: parameter references
1 parent 3ba23c4 commit d0ab2de

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/kotlin/com/github/xepozz/php_opcodes_language/language/psi/impl/PHPOpParameterBaseImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ abstract class PHPOpParameterBaseImpl : PHPOpParameter, PHPOpElementImpl {
5353
else -> when {
5454
isPrimitive(this) || isPrimitive(psiElement) -> false
5555
isSelfReferencable(this) && isSelfReferencable(psiElement) -> true
56-
this.isVariable && psiElement.isVariable -> true
56+
this.isVariable && psiElement.isVariable && this.text == psiElement.text -> true
5757
else -> false
5858
}
5959
}

src/main/kotlin/com/github/xepozz/php_opcodes_language/reference/PHPOpReferenceContributor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class PHPOpReferenceContributor : PsiReferenceContributor() {
3939
PlatformPatterns.or(
4040
PlatformPatterns.psiElement(PHPOpVarName::class.java),
4141
PlatformPatterns.psiElement(PHPOpLineNumber::class.java),
42+
PlatformPatterns.psiElement(PHPOpParameter::class.java),
4243
),
4344
object : PsiReferenceProvider() {
4445
override fun getReferencesByElement(

0 commit comments

Comments
 (0)