[Native] Don't produce broken @Deprecated annotations in c-interop

#KT-58651
This commit is contained in:
Dmitriy Dolovov
2023-05-12 10:04:35 +02:00
committed by Space Team
parent 706a4e9919
commit 2b913d7c47
22 changed files with 50 additions and 48 deletions
@@ -1,6 +1,6 @@
enum class ForwardEnumPOD private constructor(value: Int) : Enum<ForwardEnumPOD>, CEnum {
var value: ForwardEnumPOD
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(imports = {})) fun byValue(value: Int): ForwardEnumPOD
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(expression = "", imports = {})) fun byValue(value: Int): ForwardEnumPOD
var varPOD: ForwardEnumPOD
@CCall(id = "knifunptr_pod10_varPOD_getter") get
@CCall(id = "knifunptr_pod11_varPOD_setter") set
@@ -2,4 +2,4 @@
@ConstantValue.Int(value = 0) enum entry Value1POD
@ConstantValue.Int(value = 1) enum entry Value2POD
var value: ForwardEnumPOD
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(imports = {})) fun byValue(value: Int): ForwardEnumPOD
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(expression = "", imports = {})) fun byValue(value: Int): ForwardEnumPOD
@@ -5,7 +5,7 @@ package pod1 {
var __ap: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 0.toLong()) get
@CStruct.MemberAt(offset = 0.toLong()) set
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -17,7 +17,7 @@ package pod1 {
var __vr_top: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -14,7 +14,7 @@ package pod1 {
var reg_save_area: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -5,7 +5,7 @@ package pod1 {
var __ap: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 0.toLong()) get
@CStruct.MemberAt(offset = 0.toLong()) set
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -17,7 +17,7 @@ package pod1 {
var __vr_top: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -14,7 +14,7 @@ package pod1 {
var reg_save_area: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -5,7 +5,7 @@ package pod1 {
var __ap: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 0.toLong()) get
@CStruct.MemberAt(offset = 0.toLong()) set
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -17,7 +17,7 @@ package pod1 {
var __vr_top: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -14,7 +14,7 @@ package pod1 {
var reg_save_area: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -5,7 +5,7 @@ package pod1 {
var __ap: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 0.toLong()) get
@CStruct.MemberAt(offset = 0.toLong()) set
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -17,7 +17,7 @@ package pod1 {
var __vr_top: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -14,7 +14,7 @@ package pod1 {
var reg_save_area: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -5,7 +5,7 @@ package pod1 {
var __ap: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 0.toLong()) get
@CStruct.MemberAt(offset = 0.toLong()) set
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -17,7 +17,7 @@ package pod1 {
var __vr_top: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 32.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -14,7 +14,7 @@ package pod1 {
var reg_save_area: COpaquePointer? /* = CPointer<out CPointed>? */
@CStruct.MemberAt(offset = 16.toLong()) get
@CStruct.MemberAt(offset = 16.toLong()) set
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 8, size = 24.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
}
@@ -5,7 +5,7 @@ package pod1 {
var x: Int
@CStruct.MemberAt(offset = 0.toLong()) get
@CStruct.MemberAt(offset = 0.toLong()) set
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CStructVar.Type
@CStruct.VarType(align = 4, size = 4.toLong()) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CStructVar.Type
}
enum class NXMouseButton private constructor(value: UInt) : Enum<NXMouseButton>, CEnum {
@@ -14,11 +14,11 @@ package pod1 {
class Var constructor(rawPtr: NativePtr /* = NativePtr */) : CEnumVar {
var value: NXMouseButton
@CEnumVarTypeSize(size = 4) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CPrimitiveVar.Type
@CEnumVarTypeSize(size = 4) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CPrimitiveVar.Type
}
companion object {
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(imports = {})) fun byValue(value: UInt): NXMouseButton
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(expression = "", imports = {})) fun byValue(value: UInt): NXMouseButton
}
}
@@ -6,11 +6,11 @@ package pod1 {
class Var constructor(rawPtr: NativePtr /* = NativePtr */) : CEnumVar {
var value: EnumWithoutConstant
@CEnumVarTypeSize(size = 8) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CPrimitiveVar.Type
@CEnumVarTypeSize(size = 8) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CPrimitiveVar.Type
}
companion object {
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(imports = {})) fun byValue(value: Long): EnumWithoutConstant
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(expression = "", imports = {})) fun byValue(value: Long): EnumWithoutConstant
}
}
@@ -22,11 +22,11 @@ package pod1 {
class Var constructor(rawPtr: NativePtr /* = NativePtr */) : CEnumVar {
var value: ForwardEnum
@CEnumVarTypeSize(size = 8) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(imports = {})) companion object : CPrimitiveVar.Type
@CEnumVarTypeSize(size = 8) @Deprecated(level = DeprecationLevel.WARNING, message = "Use sizeOf<T>() or alignOf<T>() instead.", replaceWith = ReplaceWith(expression = "", imports = {})) companion object : CPrimitiveVar.Type
}
companion object {
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(imports = {})) fun byValue(value: Long): ForwardEnum
@Deprecated(level = DeprecationLevel.WARNING, message = "Will be removed.", replaceWith = ReplaceWith(expression = "", imports = {})) fun byValue(value: Long): ForwardEnum
}
}
@@ -30,11 +30,11 @@ package dependency {
}
package dependency {
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryClassMethod") @Deprecated(level = DeprecationLevel.WARNING, message = "Use class method instead", replaceWith = ReplaceWith(imports = {})) external fun MyClassMeta.categoryClassMethod()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryClassMethod") @Deprecated(level = DeprecationLevel.WARNING, message = "Use class method instead", replaceWith = ReplaceWith(expression = "", imports = {})) external fun MyClassMeta.categoryClassMethod()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryClassMethod") external fun SkipClassMeta.categoryClassMethod()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryClassMethod2") @Deprecated(level = DeprecationLevel.WARNING, message = "Use class method instead", replaceWith = ReplaceWith(imports = {})) external fun MyClassMeta.categoryClassMethod2()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryInstanceMethod") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(imports = {})) external fun MyClass.categoryInstanceMethod()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryClassMethod2") @Deprecated(level = DeprecationLevel.WARNING, message = "Use class method instead", replaceWith = ReplaceWith(expression = "", imports = {})) external fun MyClassMeta.categoryClassMethod2()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryInstanceMethod") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(expression = "", imports = {})) external fun MyClass.categoryInstanceMethod()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryInstanceMethod") external fun SkipClass.categoryInstanceMethod()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryInstanceMethod2") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(imports = {})) external fun MyClass.categoryInstanceMethod2()
@ObjCMethod(encoding = "v16@0:8", isStret = false, selector = "categoryInstanceMethod2") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(expression = "", imports = {})) external fun MyClass.categoryInstanceMethod2()
}
@@ -23,10 +23,10 @@ package dependency {
}
package dependency {
@Deprecated(level = DeprecationLevel.WARNING, message = "Use instance property instead", replaceWith = ReplaceWith(imports = {})) var MyClass.categoryProperty: Float
@ObjCMethod(encoding = "f16@0:8", isStret = false, selector = "categoryProperty") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(imports = {})) get
@ObjCMethod(encoding = "v20@0:8f16", isStret = false, selector = "setCategoryProperty:") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(imports = {})) set
@ObjCMethod(encoding = "f16@0:8", isStret = false, selector = "categoryProperty") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(imports = {})) external fun MyClass.categoryProperty(): Float
@ObjCMethod(encoding = "v20@0:8f16", isStret = false, selector = "setCategoryProperty:") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(imports = {})) external fun MyClass.setCategoryProperty(categoryProperty: Float)
@Deprecated(level = DeprecationLevel.WARNING, message = "Use instance property instead", replaceWith = ReplaceWith(expression = "", imports = {})) var MyClass.categoryProperty: Float
@ObjCMethod(encoding = "f16@0:8", isStret = false, selector = "categoryProperty") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(expression = "", imports = {})) get
@ObjCMethod(encoding = "v20@0:8f16", isStret = false, selector = "setCategoryProperty:") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(expression = "", imports = {})) set
@ObjCMethod(encoding = "f16@0:8", isStret = false, selector = "categoryProperty") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(expression = "", imports = {})) external fun MyClass.categoryProperty(): Float
@ObjCMethod(encoding = "v20@0:8f16", isStret = false, selector = "setCategoryProperty:") @Deprecated(level = DeprecationLevel.WARNING, message = "Use instance method instead", replaceWith = ReplaceWith(expression = "", imports = {})) external fun MyClass.setCategoryProperty(categoryProperty: Float)
}