diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt index 322374610c7..02057a2d236 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt @@ -330,16 +330,13 @@ class Fir2IrConverter( declarationStorage.enterScope(irScript) irScript.parent = parent for (scriptStatement in declaration.statements) { - if (scriptStatement is FirDeclaration) { - when (scriptStatement) { - is FirRegularClass -> { - registerClassAndNestedClasses(scriptStatement, irScript) - processClassAndNestedClassHeaders(scriptStatement) - } - is FirTypeAlias -> classifierStorage.registerTypeAlias(scriptStatement, irScript) - else -> {} + when (scriptStatement) { + is FirRegularClass -> { + registerClassAndNestedClasses(scriptStatement, irScript) + processClassAndNestedClassHeaders(scriptStatement) } - + is FirTypeAlias -> classifierStorage.registerTypeAlias(scriptStatement, irScript) + else -> {} } } for (scriptStatement in declaration.statements) { diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index 3d75f689da9..d9ed8a61796 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -71,7 +71,7 @@ class Fir2IrVisitor( private val operatorGenerator = OperatorExpressionGenerator(components, this, conversionScope) private var _annotationMode: Boolean = false - public val annotationMode: Boolean + val annotationMode: Boolean get() = _annotationMode private fun FirTypeRef.toIrType(): IrType = with(typeConverter) { toIrType() } diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/NodeConfigurator.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/NodeConfigurator.kt index e67be18854e..a37039dbaa6 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/NodeConfigurator.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/NodeConfigurator.kt @@ -491,7 +491,7 @@ object NodeConfigurator : AbstractFieldConfigurator(FirTreeBuild +name +fieldList(statement).withTransform() +symbol("FirScriptSymbol") - +FieldList("parameters", variable, withReplace = false) + +fieldList("parameters", variable, withReplace = false) +fieldList(contextReceiver, useMutableOrEmpty = true) +field("resultPropertyName", nameType, nullable = true) } diff --git a/compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.kt b/compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.kt index 5d30e29e485..ea334e47708 100644 --- a/compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.kt +++ b/compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.kt @@ -86,9 +86,7 @@ object PathUtil { val KOTLIN_SCRIPTING_PLUGIN_CLASSPATH_JARS = arrayOf( KOTLIN_SCRIPTING_COMPILER_PLUGIN_JAR, KOTLIN_SCRIPTING_COMPILER_IMPL_JAR, - KOTLINX_COROUTINES_CORE_JAR, KOTLIN_SCRIPTING_COMMON_JAR, KOTLIN_SCRIPTING_JVM_JAR, - JS_ENGINES_JAR ) const val KOTLIN_TEST_NAME = "kotlin-test"