Add ABI tests for classes extending Number and CharSequence
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
inline class InlineCharSequence(private val cs: CharSequence) : CharSequence {
|
||||
override val length: Int get() = cs.length
|
||||
override fun get(index: Int): Char = cs[index]
|
||||
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence = cs.subSequence(startIndex, endIndex)
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
@kotlin.Metadata
|
||||
public final class InlineCharSequence {
|
||||
// source: 'inlineCharSequence.kt'
|
||||
private final field cs: java.lang.CharSequence
|
||||
private synthetic method <init>(p0: java.lang.CharSequence): void
|
||||
public synthetic final static method box-impl(p0: java.lang.CharSequence): InlineCharSequence
|
||||
public bridge final method charAt(p0: int): char
|
||||
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.CharSequence): java.lang.CharSequence
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.lang.CharSequence, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.lang.CharSequence, p1: java.lang.CharSequence): boolean
|
||||
public method get(p0: int): char
|
||||
public static method get-impl(p0: java.lang.CharSequence, p1: int): char
|
||||
public method getLength(): int
|
||||
public static method getLength-impl(p0: java.lang.CharSequence): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.lang.CharSequence): int
|
||||
public bridge final method length(): int
|
||||
public @org.jetbrains.annotations.NotNull method subSequence(p0: int, p1: int): java.lang.CharSequence
|
||||
public static @org.jetbrains.annotations.NotNull method subSequence-impl(p0: java.lang.CharSequence, p1: int, p2: int): java.lang.CharSequence
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: java.lang.CharSequence): java.lang.String
|
||||
public synthetic final method unbox-impl(): java.lang.CharSequence
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
@kotlin.Metadata
|
||||
public final class InlineCharSequence {
|
||||
// source: 'inlineCharSequence.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field cs: java.lang.CharSequence
|
||||
private synthetic method <init>(p0: java.lang.CharSequence): void
|
||||
public synthetic final static method box-impl(p0: java.lang.CharSequence): InlineCharSequence
|
||||
public bridge final method charAt(p0: int): char
|
||||
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.CharSequence): java.lang.CharSequence
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.lang.CharSequence, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.lang.CharSequence, p1: java.lang.CharSequence): boolean
|
||||
public method get(p0: int): char
|
||||
public static method get-impl(@org.jetbrains.annotations.NotNull p0: java.lang.CharSequence, p1: int): char
|
||||
public method getLength(): int
|
||||
public static method getLength-impl(@org.jetbrains.annotations.NotNull p0: java.lang.CharSequence): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.lang.CharSequence): int
|
||||
public synthetic bridge method length(): int
|
||||
public @org.jetbrains.annotations.NotNull method subSequence(p0: int, p1: int): java.lang.CharSequence
|
||||
public static @org.jetbrains.annotations.NotNull method subSequence-impl(@org.jetbrains.annotations.NotNull p0: java.lang.CharSequence, p1: int, p2: int): java.lang.CharSequence
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: java.lang.CharSequence): java.lang.String
|
||||
public synthetic final method unbox-impl(): java.lang.CharSequence
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
abstract class AbstractCharSequence : CharSequence
|
||||
|
||||
class MyCharSequence : CharSequence {
|
||||
override val length: Int get() = 0
|
||||
|
||||
override fun get(index: Int): Char = throw Exception()
|
||||
|
||||
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence = this
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
@kotlin.Metadata
|
||||
public abstract class AbstractCharSequence {
|
||||
// source: 'charSequence.kt'
|
||||
public method <init>(): void
|
||||
public bridge final method charAt(p0: int): char
|
||||
public abstract method get(p0: int): char
|
||||
public abstract method getLength(): int
|
||||
public bridge final method length(): int
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyCharSequence {
|
||||
// source: 'charSequence.kt'
|
||||
public method <init>(): void
|
||||
public bridge final method charAt(p0: int): char
|
||||
public method get(p0: int): char
|
||||
public method getLength(): int
|
||||
public bridge final method length(): int
|
||||
public @org.jetbrains.annotations.NotNull method subSequence(p0: int, p1: int): java.lang.CharSequence
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// ^ see KT-42578
|
||||
|
||||
abstract class AbstractNumber : Number()
|
||||
|
||||
class MyNumber : Number() {
|
||||
override fun toByte(): Byte = 0
|
||||
override fun toChar(): Char = 0.toChar()
|
||||
override fun toDouble(): Double = 0.0
|
||||
override fun toFloat(): Float = 0.0f
|
||||
override fun toInt(): Int = 0
|
||||
override fun toLong(): Long = 0
|
||||
override fun toShort(): Short = 0
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
@kotlin.Metadata
|
||||
public abstract class AbstractNumber {
|
||||
// source: 'number.kt'
|
||||
public method <init>(): void
|
||||
public bridge final method byteValue(): byte
|
||||
public bridge final method doubleValue(): double
|
||||
public bridge final method floatValue(): float
|
||||
public bridge final method intValue(): int
|
||||
public bridge final method longValue(): long
|
||||
public bridge final method shortValue(): short
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyNumber {
|
||||
// source: 'number.kt'
|
||||
public method <init>(): void
|
||||
public bridge final method byteValue(): byte
|
||||
public bridge final method doubleValue(): double
|
||||
public bridge final method floatValue(): float
|
||||
public bridge final method intValue(): int
|
||||
public bridge final method longValue(): long
|
||||
public bridge final method shortValue(): short
|
||||
public method toByte(): byte
|
||||
public method toChar(): char
|
||||
public method toDouble(): double
|
||||
public method toFloat(): float
|
||||
public method toInt(): int
|
||||
public method toLong(): long
|
||||
public method toShort(): short
|
||||
}
|
||||
Reference in New Issue
Block a user