turn on explicitApi for SIR modules

Merge-request: KT-MR-13448
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
This commit is contained in:
Artem Olkov
2023-12-12 09:02:55 +00:00
committed by Space Team
parent a03fd2e29a
commit 6c4a6e2a02
10 changed files with 48 additions and 32 deletions
+4
View File
@@ -4,6 +4,10 @@ plugins {
description = "Infrastructure of transformations over SIR"
kotlin {
explicitApi()
}
dependencies {
compileOnly(kotlinStdlib())
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.sir.SirElement
* Swift IR is supposed to be transformed by a series of passes.
* This is a base interface that all such passes should implement.
*/
interface SirPass<out R, in T> {
public interface SirPass<out R, in T> {
/**
* Executes the pass over the given [SirElement].
@@ -20,5 +20,5 @@ interface SirPass<out R, in T> {
* @param data Additional data that is required to run the pass.
* @return The result of the pass.
*/
fun run(element: SirElement, data: T): R
public fun run(element: SirElement, data: T): R
}
@@ -22,7 +22,7 @@ import java.lang.IllegalStateException
* or `element` does not contain origin of type `SirOrigin.KotlinEntity.Function`,
* returns original element.
*/
class ForeignIntoSwiftFunctionTranslationPass : SirPass<SirElement, Unit> {
public class ForeignIntoSwiftFunctionTranslationPass : SirPass<SirElement, Unit> {
private class Transformer : SirTransformer<Unit>() {
override fun <E : SirElement> transformElement(element: E, data: Unit): E {