[FIR] builder: drop unused forcedElementSourceKind
There was only one usage by withDefaultSourceElementKind that was dropped in the previous commit ^KT-63042
This commit is contained in:
committed by
Space Team
parent
6c1f5b7a74
commit
9d72c1c370
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 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.
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@ abstract class AbstractLightTreeRawFirBuilder(
|
||||
override fun LighterASTNode.toFirSourceElement(kind: KtFakeSourceElementKind?): KtLightSourceElement {
|
||||
val startOffset = tree.getStartOffset(this)
|
||||
val endOffset = tree.getEndOffset(this)
|
||||
return toKtLightSourceElement(tree, kind ?: context.forcedElementSourceKind ?: KtRealSourceElementKind, startOffset, endOffset)
|
||||
return toKtLightSourceElement(tree, kind ?: KtRealSourceElementKind, startOffset, endOffset)
|
||||
}
|
||||
|
||||
override val LighterASTNode.elementType: IElementType
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 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.
|
||||
*/
|
||||
|
||||
@@ -78,7 +78,7 @@ class LightTreeRawFirExpressionBuilder(
|
||||
)
|
||||
}
|
||||
else -> buildErrorExpression(
|
||||
converted?.source?.withForcedKindFrom(context) ?: expression?.toFirSourceElement(),
|
||||
converted?.source?.realElement() ?: expression?.toFirSourceElement(),
|
||||
if (expression == null) ConeSyntaxDiagnostic(errorReason)
|
||||
else ConeSimpleDiagnostic(errorReason, DiagnosticKind.ExpressionExpected),
|
||||
converted,
|
||||
|
||||
Reference in New Issue
Block a user