FIR: fix incorrect psi for named & spread arguments in FIR builder
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2000-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2020 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.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -237,13 +237,13 @@ class RawFirBuilder(
|
|||||||
val isSpread = getSpreadElement() != null
|
val isSpread = getSpreadElement() != null
|
||||||
return when {
|
return when {
|
||||||
name != null -> buildNamedArgumentExpression {
|
name != null -> buildNamedArgumentExpression {
|
||||||
source = expression?.toFirSourceElement()
|
source = (this@toFirExpression as? PsiElement)?.toFirSourceElement()
|
||||||
this.expression = firExpression
|
this.expression = firExpression
|
||||||
this.isSpread = isSpread
|
this.isSpread = isSpread
|
||||||
this.name = name
|
this.name = name
|
||||||
}
|
}
|
||||||
isSpread -> buildSpreadArgumentExpression {
|
isSpread -> buildSpreadArgumentExpression {
|
||||||
source = expression?.toFirSourceElement()
|
source = (this@toFirExpression as? PsiElement)?.toFirSourceElement()
|
||||||
this.expression = firExpression
|
this.expression = firExpression
|
||||||
}
|
}
|
||||||
else -> firExpression
|
else -> firExpression
|
||||||
|
|||||||
Reference in New Issue
Block a user