From 3b6d3e5a0896a8df5d6f3c67c54a479846485943 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 16 Mar 2021 18:41:42 +0300 Subject: [PATCH] [FIR] Don't record `isFromVararg` attribute to all properties from constructor --- .../org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt | 4 +++- .../src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt index 031eba0172b..fad51108fcd 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt @@ -85,7 +85,9 @@ class ValueParameter( modifiers.getVisibility() ) else null }.apply { - this.isFromVararg = firValueParameter.isVararg + if (firValueParameter.isVararg) { + this.isFromVararg = true + } } } } diff --git a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt index 2b9a2e5556d..cdb796dca85 100644 --- a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt +++ b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt @@ -463,7 +463,9 @@ open class RawFirBuilder( dispatchReceiverType = currentDispatchReceiverType() }.apply { - isFromVararg = firParameter.isVararg + if (firParameter.isVararg) { + isFromVararg = true + } } }