Alphabetical sort wrapped intersection types for rendered diagnostics

This commit is contained in:
victor.petukhov
2018-12-28 15:34:42 +03:00
parent acd6d354dc
commit ec8a6cbe9c
118 changed files with 1387 additions and 937 deletions
+60 -15
View File
@@ -1,19 +1,23 @@
class _Class {
class Class {
val prop_1 = 1
val prop_2 = 2
val prop_3 = 3
val prop_4: Float? = 3f
val prop_5: Float = 3f
val prop_6: String = "..."
val prop_7: Nothing? = "..."
fun fun_1(): (Int) -> (Int) -> Int = {number: Int -> { number * 5 }}
fun fun_2(value_1: Int): Int = value_1 * 2
fun fun_3(value_1: Int): (Int) -> Int = fun(value_2: Int): Int = value_1 * value_2 * 2
operator fun contains(a: Int): Boolean = a > 30
operator fun contains(a: Long): Boolean = a > 30L
operator fun contains(a: Char): Boolean = a > 30.toChar()
operator fun contains(a: Int) = a > 30
operator fun contains(a: Long) = a > 30L
operator fun contains(a: Char) = a > 30.toChar()
fun getIntArray(value_1: Int): IntArray = intArrayOf(1, 2, 3, value_1, 91923, 14, 123124)
fun getLongArray(value_1: Long): LongArray = longArrayOf(1L, 2L, 3L, value_1, 9192323244L, 14L, 123124L)
fun getCharArray(value_1: Char): CharArray = charArrayOf(1.toChar(), 2.toChar(), 3.toChar(), value_1)
fun getIntArray() = intArrayOf(1, 2, 3, 4, 5)
fun getLongArray() = longArrayOf(1L, 2L, 3L, 4L, 5L)
fun getCharArray() = charArrayOf(1.toChar(), 2.toChar(), 3.toChar(), 4.toChar(), 5.toChar())
class _NestedClass {
val prop_4 = 4
@@ -21,15 +25,56 @@ class _Class {
}
}
class _EmptyClass {}
class EmptyClass {}
class _ClassWithCompanionObject {
class ClassWithCompanionObject {
companion object {}
}
open class _ClassLevel1 {}
open class _ClassLevel2: _ClassLevel1() {}
open class _ClassLevel3: _ClassLevel2() {}
open class _ClassLevel4: _ClassLevel3() {}
open class _ClassLevel5: _ClassLevel4() {}
class _ClassLevel6: _ClassLevel5() {}
open class ClassLevel1 {
fun test1() {}
}
open class ClassLevel2: ClassLevel1() {
fun test2() {}
}
open class ClassLevel3: ClassLevel2() {
fun test3() {}
}
open class ClassLevel4: ClassLevel3() {
fun test4() {}
}
open class ClassLevel5: ClassLevel4() {
fun test5() {}
}
class ClassLevel6: ClassLevel5() {
fun test6() {}
}
class Inv<T>(val x: T = null as T) {
fun test() {}
fun get() = x
fun put(x: T) {}
fun getNullable(): T? = select(x, null)
}
class In<in T>() {
fun put(x: T) {}
fun <K : T> getWithUpperBoundT(): K = x <!UNCHECKED_CAST!>as K<!>
}
class Out<out T>(val x: T = null as T) {
fun get() = x
}
open class ClassWithTwoTypeParameters<K, L> {
fun test1(): T? { return null }
fun test2(): K? { return null }
}
class ClassWithThreeTypeParameters<K, L, M>(
val x: K,
val y: L,
val z: M
)
class ClassWithSixTypeParameters<K, in L, out M, O, in P, out R>