Light classes: test extending Number and CharSequence
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
public final class Container {
|
||||
public Container() { /* compiled code */ }
|
||||
|
||||
public static final class MyString implements java.lang.CharSequence {
|
||||
public int getLength() { /* compiled code */ }
|
||||
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public error.NonExistentClass chars() { /* compiled code */ }
|
||||
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public error.NonExistentClass codePoints() { /* compiled code */ }
|
||||
|
||||
public char get(int index) { /* compiled code */ }
|
||||
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public java.lang.CharSequence subSequence(int startIndex, int endIndex) { /* compiled code */ }
|
||||
|
||||
public MyString() { /* compiled code */ }
|
||||
}
|
||||
|
||||
public static final class MyNumber extends java.lang.Number {
|
||||
public byte toByte() { /* compiled code */ }
|
||||
|
||||
public char toChar() { /* compiled code */ }
|
||||
|
||||
public double toDouble() { /* compiled code */ }
|
||||
|
||||
public float toFloat() { /* compiled code */ }
|
||||
|
||||
public int toInt() { /* compiled code */ }
|
||||
|
||||
public long toLong() { /* compiled code */ }
|
||||
|
||||
public short toShort() { /* compiled code */ }
|
||||
|
||||
public MyNumber() { /* compiled code */ }
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
// p1.Container
|
||||
package p1
|
||||
|
||||
class Container {
|
||||
class MyString : CharSequence {
|
||||
override val length: Int
|
||||
get() = 0
|
||||
|
||||
override fun chars(): IntStream = error("")
|
||||
|
||||
override fun codePoints(): IntStream = error("")
|
||||
|
||||
override fun get(index: Int): Char = 'c'
|
||||
|
||||
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence = MyString()
|
||||
}
|
||||
|
||||
class MyNumber : Number {
|
||||
override fun toByte(): Byte {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
override fun toChar(): Char {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
override fun toDouble(): Double {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
override fun toFloat(): Float {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
override fun toInt(): Int {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
override fun toLong(): Long {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
override fun toShort(): Short {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user