diff --git a/transpiler/java/com/google/j2cl/transpiler/frontend/kotlin/KotlinEnvironment.kt b/transpiler/java/com/google/j2cl/transpiler/frontend/kotlin/KotlinEnvironment.kt index 960bb3db7c..c648633f29 100644 --- a/transpiler/java/com/google/j2cl/transpiler/frontend/kotlin/KotlinEnvironment.kt +++ b/transpiler/java/com/google/j2cl/transpiler/frontend/kotlin/KotlinEnvironment.kt @@ -62,7 +62,6 @@ import com.google.j2cl.transpiler.frontend.kotlin.ir.isJsOptional import com.google.j2cl.transpiler.frontend.kotlin.ir.isJsType import com.google.j2cl.transpiler.frontend.kotlin.ir.isNativeJsField import com.google.j2cl.transpiler.frontend.kotlin.ir.isUncheckedCast -import com.google.j2cl.transpiler.frontend.kotlin.ir.j2clIsAnnotation import com.google.j2cl.transpiler.frontend.kotlin.ir.j2clKind import com.google.j2cl.transpiler.frontend.kotlin.ir.j2clVisibility import com.google.j2cl.transpiler.frontend.kotlin.ir.javaName @@ -109,6 +108,7 @@ import org.jetbrains.kotlin.ir.util.defaultType import org.jetbrains.kotlin.ir.util.dump import org.jetbrains.kotlin.ir.util.file import org.jetbrains.kotlin.ir.util.hasAnnotation +import org.jetbrains.kotlin.ir.util.isAnnotationClass import org.jetbrains.kotlin.ir.util.isAnonymousObject import org.jetbrains.kotlin.ir.util.isFakeOverride import org.jetbrains.kotlin.ir.util.isFromJava @@ -203,7 +203,7 @@ class KotlinEnvironment( TypeDeclaration.newBuilder() .setClassComponents(irClass.getClassComponents()) .setKind(irClass.j2clKind) - .setAnnotation(irClass.j2clIsAnnotation) + .setAnnotation(irClass.isAnnotationClass) .setSourceLanguage(if (irClass.isFromJava()) JAVA else KOTLIN) .setOriginalSimpleSourceName(irClass.simpleSourceName) .setPackage(createPackageDeclaration(irClass.packageFqName!!.asString())) diff --git a/transpiler/java/com/google/j2cl/transpiler/frontend/kotlin/ir/IrUtils.kt b/transpiler/java/com/google/j2cl/transpiler/frontend/kotlin/ir/IrUtils.kt index e874fdc165..795f93ed99 100644 --- a/transpiler/java/com/google/j2cl/transpiler/frontend/kotlin/ir/IrUtils.kt +++ b/transpiler/java/com/google/j2cl/transpiler/frontend/kotlin/ir/IrUtils.kt @@ -149,9 +149,6 @@ val IrClass.j2clKind: Kind ClassKind.ENUM_CLASS -> Kind.ENUM } -val IrClass.j2clIsAnnotation: Boolean - get() = kind == ClassKind.ANNOTATION_CLASS - val IrDeclarationWithVisibility.j2clVisibility: Visibility get() = when (visibility.delegate) {