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.
|
||||
*/
|
||||
|
||||
@@ -237,13 +237,13 @@ class RawFirBuilder(
|
||||
val isSpread = getSpreadElement() != null
|
||||
return when {
|
||||
name != null -> buildNamedArgumentExpression {
|
||||
source = expression?.toFirSourceElement()
|
||||
source = (this@toFirExpression as? PsiElement)?.toFirSourceElement()
|
||||
this.expression = firExpression
|
||||
this.isSpread = isSpread
|
||||
this.name = name
|
||||
}
|
||||
isSpread -> buildSpreadArgumentExpression {
|
||||
source = expression?.toFirSourceElement()
|
||||
source = (this@toFirExpression as? PsiElement)?.toFirSourceElement()
|
||||
this.expression = firExpression
|
||||
}
|
||||
else -> firExpression
|
||||
|
||||
Reference in New Issue
Block a user