JVM IR: do not generate Deprecated(HIDDEN) class as synthetic

#KT-41810 Fixed
This commit is contained in:
Alexander Udalov
2020-09-10 22:30:54 +02:00
parent 162dc3aa0c
commit 2a0f64ebcb
13 changed files with 113 additions and 47 deletions
@@ -0,0 +1,8 @@
@Deprecated("", level = DeprecationLevel.WARNING)
class W
@Deprecated("", level = DeprecationLevel.ERROR)
class E
@Deprecated("", level = DeprecationLevel.HIDDEN)
class H
@@ -0,0 +1,20 @@
@kotlin.Deprecated
@kotlin.Metadata
public deprecated final class E {
// source: 'deprecatedClass.kt'
public method <init>(): void
}
@kotlin.Deprecated
@kotlin.Metadata
public deprecated final class H {
// source: 'deprecatedClass.kt'
public method <init>(): void
}
@kotlin.Deprecated
@kotlin.Metadata
public deprecated final class W {
// source: 'deprecatedClass.kt'
public method <init>(): void
}
@@ -0,0 +1,7 @@
// WITH_RUNTIME
enum class Test {
@Deprecated("") ENTRY1,
ENTRY2,
@Deprecated("") ENTRY3
}
@@ -0,0 +1,12 @@
@kotlin.Metadata
public final enum class Test {
// source: 'deprecatedEnumEntryFields.kt'
private synthetic final static field $VALUES: Test[]
public deprecated final enum static @kotlin.Deprecated field ENTRY1: Test
public final enum static field ENTRY2: Test
public deprecated final enum static @kotlin.Deprecated field ENTRY3: Test
static method <clinit>(): void
private method <init>(p0: java.lang.String, p1: int): void
public static method valueOf(p0: java.lang.String): Test
public static method values(): Test[]
}
@@ -0,0 +1,2 @@
@Deprecated("")
lateinit var lateinitVar: String
@@ -0,0 +1,8 @@
@kotlin.Metadata
public final class DeprecatedLateinitVarKt {
// source: 'deprecatedLateinitVar.kt'
public deprecated static field lateinitVar: java.lang.String
public synthetic deprecated static @kotlin.Deprecated method getLateinitVar$annotations(): void
public deprecated final static @org.jetbrains.annotations.NotNull method getLateinitVar(): java.lang.String
public deprecated final static method setLateinitVar(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
}
@@ -0,0 +1,53 @@
@Deprecated("")
val testVal = 1
@Deprecated("")
var testVar = 1
@Deprecated("")
val testValWithExplicitDefaultGet = 1
get
@Deprecated("")
val testValWithExplicitGet
get() = 1
@Deprecated("")
var testVarWithExplicitDefaultGet = 1
get
@Deprecated("")
var testVarWithExplicitDefaultSet = 1
set
@Deprecated("")
var testVarWithExplicitDefaultGetSet: Int = 1
get
set
@Deprecated("")
var testVarWithExplicitGetSet
get() = 1
set(v) {}
@Deprecated("")
lateinit var testLateinitVar: Any
@Deprecated("")
val Any.testExtVal
get() = 1
@Deprecated("")
var Any.textExtVar
get() = 1
set(v) {}
@Deprecated("")
val <T> List<T>.testGenExtVal
get() = 1
@Deprecated("")
var <T> List<T>.textGenExtVar
get() = 1
set(v) {}
@@ -0,0 +1,46 @@
@kotlin.Metadata
public final class DeprecatedPropertyKt {
// source: 'deprecatedProperty.kt'
public deprecated static field testLateinitVar: java.lang.Object
private deprecated final static field testVal: int
private deprecated final static field testValWithExplicitDefaultGet: int
private deprecated static field testVar: int
private deprecated static field testVarWithExplicitDefaultGet: int
private deprecated static field testVarWithExplicitDefaultGetSet: int
private deprecated static field testVarWithExplicitDefaultSet: int
static method <clinit>(): void
public synthetic deprecated static @kotlin.Deprecated method getTestExtVal$annotations(p0: java.lang.Object): void
public deprecated final static method getTestExtVal(@org.jetbrains.annotations.NotNull p0: java.lang.Object): int
public synthetic deprecated static @kotlin.Deprecated method getTestGenExtVal$annotations(p0: java.util.List): void
public deprecated final static method getTestGenExtVal(@org.jetbrains.annotations.NotNull p0: java.util.List): int
public synthetic deprecated static @kotlin.Deprecated method getTestLateinitVar$annotations(): void
public deprecated final static @org.jetbrains.annotations.NotNull method getTestLateinitVar(): java.lang.Object
public synthetic deprecated static @kotlin.Deprecated method getTestVal$annotations(): void
public deprecated final static method getTestVal(): int
public synthetic deprecated static @kotlin.Deprecated method getTestValWithExplicitDefaultGet$annotations(): void
public deprecated final static method getTestValWithExplicitDefaultGet(): int
public synthetic deprecated static @kotlin.Deprecated method getTestValWithExplicitGet$annotations(): void
public deprecated final static method getTestValWithExplicitGet(): int
public synthetic deprecated static @kotlin.Deprecated method getTestVar$annotations(): void
public deprecated final static method getTestVar(): int
public synthetic deprecated static @kotlin.Deprecated method getTestVarWithExplicitDefaultGet$annotations(): void
public deprecated final static method getTestVarWithExplicitDefaultGet(): int
public synthetic deprecated static @kotlin.Deprecated method getTestVarWithExplicitDefaultGetSet$annotations(): void
public deprecated final static method getTestVarWithExplicitDefaultGetSet(): int
public synthetic deprecated static @kotlin.Deprecated method getTestVarWithExplicitDefaultSet$annotations(): void
public deprecated final static method getTestVarWithExplicitDefaultSet(): int
public synthetic deprecated static @kotlin.Deprecated method getTestVarWithExplicitGetSet$annotations(): void
public deprecated final static method getTestVarWithExplicitGetSet(): int
public synthetic deprecated static @kotlin.Deprecated method getTextExtVar$annotations(p0: java.lang.Object): void
public deprecated final static method getTextExtVar(@org.jetbrains.annotations.NotNull p0: java.lang.Object): int
public synthetic deprecated static @kotlin.Deprecated method getTextGenExtVar$annotations(p0: java.util.List): void
public deprecated final static method getTextGenExtVar(@org.jetbrains.annotations.NotNull p0: java.util.List): int
public deprecated final static method setTestLateinitVar(@org.jetbrains.annotations.NotNull p0: java.lang.Object): void
public deprecated final static method setTestVar(p0: int): void
public deprecated final static method setTestVarWithExplicitDefaultGet(p0: int): void
public deprecated final static method setTestVarWithExplicitDefaultGetSet(p0: int): void
public deprecated final static method setTestVarWithExplicitDefaultSet(p0: int): void
public deprecated final static method setTestVarWithExplicitGetSet(p0: int): void
public deprecated final static method setTextExtVar(@org.jetbrains.annotations.NotNull p0: java.lang.Object, p1: int): void
public deprecated final static method setTextGenExtVar(@org.jetbrains.annotations.NotNull p0: java.util.List, p1: int): void
}