Use standard @Deprecated in place of special opt-in annotation
Remove @DeprecatedVisitor
This commit is contained in:
committed by
Space Team
parent
c4d409608c
commit
474ef921d8
@@ -7,7 +7,6 @@ package org.jetbrains.kotlin.kotlinp.test
|
||||
|
||||
import com.intellij.openapi.Disposable
|
||||
import junit.framework.TestCase.assertEquals
|
||||
import kotlinx.metadata.DeprecatedVisitor
|
||||
import kotlinx.metadata.jvm.KotlinClassMetadata
|
||||
import kotlinx.metadata.jvm.KotlinModuleMetadata
|
||||
import org.jetbrains.kotlin.checkers.setupLanguageVersionSettingsForCompilerTests
|
||||
@@ -26,7 +25,6 @@ import org.jetbrains.kotlin.test.util.KtTestUtil
|
||||
import java.io.File
|
||||
import kotlin.test.fail
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
fun compileAndPrintAllFiles(file: File, disposable: Disposable, tmpdir: File, compareWithTxt: Boolean, readWriteAndCompare: Boolean) {
|
||||
val main = StringBuilder()
|
||||
val afterVisitors = StringBuilder()
|
||||
@@ -99,8 +97,7 @@ private fun StringBuilder.appendFileName(file: File) {
|
||||
// Reads the class file and writes it back with *Writer visitors.
|
||||
// The resulting class file should be the same from the point of view of any metadata reader, including kotlinp
|
||||
// (the exact bytes may differ though, because there are multiple ways to encode the same metadata)
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
@DeprecatedVisitor // TODO: not sure this test is needed at all now
|
||||
@Suppress("DEPRECATION")
|
||||
private fun transformClassFileWithReadWriteVisitors(classFile: KotlinClassMetadata): KotlinClassMetadata =
|
||||
when (classFile) {
|
||||
is KotlinClassMetadata.Class -> KotlinClassMetadata.Class.Writer().apply(classFile::accept).write()
|
||||
@@ -132,8 +129,7 @@ private fun transformClassFileWithNodes(classFile: KotlinClassMetadata): KotlinC
|
||||
else -> classFile
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
@DeprecatedVisitor
|
||||
@Suppress("DEPRECATION")
|
||||
private fun transformModuleFileWithReadWriteVisitors(moduleFile: KotlinModuleMetadata): KotlinModuleMetadata =
|
||||
KotlinModuleMetadata.Writer().apply(moduleFile::accept).write()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user