Create FIR fake source element for vararg argument expression
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ internal fun remapArgumentsWithVararg(
|
||||
) {
|
||||
arguments += arg
|
||||
if (this.source == null) {
|
||||
this.source = arg.source
|
||||
this.source = arg.source?.fakeElement(FirFakeSourceElementKind.VarargArgument)
|
||||
}
|
||||
} else if (arguments.isEmpty()) {
|
||||
// `arg` is BEFORE the vararg arguments.
|
||||
|
||||
@@ -150,6 +150,10 @@ sealed class FirFakeSourceElementKind : FirSourceElementKind() {
|
||||
// super.foo() --> super<Supertype>.foo()
|
||||
// where `Supertype` has a fake source
|
||||
object SuperCallImplicitType : FirFakeSourceElementKind()
|
||||
|
||||
// fun foo(vararg args: Int) {}
|
||||
// fun bar(1, 2, 3) --> [resolved] fun bar(VarargArgument(1, 2, 3))
|
||||
object VarargArgument : FirFakeSourceElementKind()
|
||||
}
|
||||
|
||||
sealed class FirSourceElement {
|
||||
|
||||
Reference in New Issue
Block a user