[IR] update testdata after rebase
This commit is contained in:
committed by
teamcityserver
parent
1c6c996084
commit
3b1a6389ab
@@ -113,7 +113,16 @@ dataClassArrayMemberToString(arg0 = #doubleArray) +
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return dataClassArrayMemberHashCode(arg0 = #stringArray).times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #charArray)).times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #booleanArray)).times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #byteArray)).times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #shortArray)).times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #intArray)).times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #longArray)).times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #floatArray)).times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #doubleArray))
|
var result: Int = dataClassArrayMemberHashCode(arg0 = #stringArray)
|
||||||
|
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #charArray))
|
||||||
|
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #booleanArray))
|
||||||
|
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #byteArray))
|
||||||
|
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #shortArray))
|
||||||
|
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #intArray))
|
||||||
|
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #longArray))
|
||||||
|
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #floatArray))
|
||||||
|
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = #doubleArray))
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override operator fun equals(other: Any?): Boolean {
|
override operator fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
+10
-3
@@ -47,7 +47,10 @@ data class Test1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return #x.hashCode().times(other = 31).plus(other = #y.hashCode()).times(other = 31).plus(other = #z.hashCode())
|
var result: Int = #x.hashCode()
|
||||||
|
result = result.times(other = 31).plus(other = #y.hashCode())
|
||||||
|
result = result.times(other = 31).plus(other = #z.hashCode())
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override operator fun equals(other: Any?): Boolean {
|
override operator fun equals(other: Any?): Boolean {
|
||||||
@@ -181,13 +184,17 @@ data class Test3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return #d.hashCode().times(other = 31).plus(other = when {
|
var result: Int = #d.hashCode()
|
||||||
|
result = result.times(other = 31).plus(other = when {
|
||||||
EQEQ(arg0 = #dn, arg1 = null) -> 0
|
EQEQ(arg0 = #dn, arg1 = null) -> 0
|
||||||
true -> #dn.hashCode()
|
true -> #dn.hashCode()
|
||||||
}).times(other = 31).plus(other = #f.hashCode()).times(other = 31).plus(other = when {
|
})
|
||||||
|
result = result.times(other = 31).plus(other = #f.hashCode())
|
||||||
|
result = result.times(other = 31).plus(other = when {
|
||||||
EQEQ(arg0 = #df, arg1 = null) -> 0
|
EQEQ(arg0 = #df, arg1 = null) -> 0
|
||||||
true -> #df.hashCode()
|
true -> #df.hashCode()
|
||||||
})
|
})
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override operator fun equals(other: Any?): Boolean {
|
override operator fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
+4
-2
@@ -36,10 +36,12 @@ data class Test<T : Any?> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return when {
|
var result: Int = when {
|
||||||
EQEQ(arg0 = #x, arg1 = null) -> 0
|
EQEQ(arg0 = #x, arg1 = null) -> 0
|
||||||
true -> #x.hashCode()
|
true -> #x.hashCode()
|
||||||
}.times(other = 31).plus(other = #y.hashCode())
|
}
|
||||||
|
result = result.times(other = 31).plus(other = #y.hashCode())
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override operator fun equals(other: Any?): Boolean {
|
override operator fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
Vendored
-1
@@ -58,7 +58,6 @@ fun testInnerClassConstructor(outer: Outer): Any {
|
|||||||
|
|
||||||
fun testInnerClassConstructorCapturingOuter(): Any {
|
fun testInnerClassConstructorCapturingOuter(): Any {
|
||||||
return use(fn = { //BLOCK
|
return use(fn = { //BLOCK
|
||||||
val tmp0_receiver: Outer = TODO("IrConstructorCall")
|
|
||||||
local fun Outer.<init>(p0: Int): Inner {
|
local fun Outer.<init>(p0: Int): Inner {
|
||||||
return TODO("IrConstructorCall")
|
return TODO("IrConstructorCall")
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -93,7 +93,6 @@ fun testWithDefaults() {
|
|||||||
|
|
||||||
fun testWithBoundReceiver() {
|
fun testWithBoundReceiver() {
|
||||||
useSuspend(fn = { //BLOCK
|
useSuspend(fn = { //BLOCK
|
||||||
val tmp0_receiver: C = TODO("IrConstructorCall")
|
|
||||||
local suspend fun C.bar() {
|
local suspend fun C.bar() {
|
||||||
receiver.bar()
|
receiver.bar()
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
-2
@@ -39,7 +39,6 @@ class Host {
|
|||||||
fun testBoundReceiverLocalVar() {
|
fun testBoundReceiverLocalVar() {
|
||||||
var h: Host = TODO("IrConstructorCall")
|
var h: Host = TODO("IrConstructorCall")
|
||||||
use(fn = { //BLOCK
|
use(fn = { //BLOCK
|
||||||
val tmp0_receiver: Host = h
|
|
||||||
local fun Host.withVararg(p0: Int) {
|
local fun Host.withVararg(p0: Int) {
|
||||||
receiver.withVararg(xs = [p0]) /*~> Unit */
|
receiver.withVararg(xs = [p0]) /*~> Unit */
|
||||||
}
|
}
|
||||||
@@ -62,7 +61,6 @@ class Host {
|
|||||||
|
|
||||||
fun testBoundReceiverExpression() {
|
fun testBoundReceiverExpression() {
|
||||||
use(fn = { //BLOCK
|
use(fn = { //BLOCK
|
||||||
val tmp0_receiver: Host = TODO("IrConstructorCall")
|
|
||||||
local fun Host.withVararg(p0: Int) {
|
local fun Host.withVararg(p0: Int) {
|
||||||
receiver.withVararg(xs = [p0]) /*~> Unit */
|
receiver.withVararg(xs = [p0]) /*~> Unit */
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -26,7 +26,7 @@ fun test1(): @FlexibleNullability String? {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun test2(): String {
|
fun test2(): String {
|
||||||
return checkT<String?>(fn = local fun <anonymous>(): String? {
|
return checkT<@EnhancedNullability String>(fn = local fun <anonymous>(): @EnhancedNullability String {
|
||||||
return nnFoo()
|
return nnFoo()
|
||||||
}
|
}
|
||||||
) /*!! String */
|
) /*!! String */
|
||||||
@@ -40,7 +40,7 @@ fun test3(): @FlexibleNullability String? {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun test4(): String {
|
fun test4(): String {
|
||||||
return checkTAny<String?>(fn = local fun <anonymous>(): String? {
|
return checkTAny<@EnhancedNullability String>(fn = local fun <anonymous>(): @EnhancedNullability String {
|
||||||
return nnFoo()
|
return nnFoo()
|
||||||
}
|
}
|
||||||
) /*!! String */
|
) /*!! String */
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ fun test5(a: Any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun <T : Any?> test6(a: Function1<T, T>) {
|
fun <T : Any?> test6(a: Function1<T, T>) {
|
||||||
bar<T?>(j = a /*-> @FlexibleNullability J<T?>? */)
|
bar<@FlexibleNullability T?>(j = a /*-> @FlexibleNullability J<@FlexibleNullability T?>? */)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <T : Any?> test7(a: Any) {
|
fun <T : Any?> test7(a: Any) {
|
||||||
a as Function1<T, T> /*~> Unit */
|
a as Function1<T, T> /*~> Unit */
|
||||||
bar<T?>(j = a /*as Function1<@ParameterName(...) T?, T?> */ /*-> @FlexibleNullability J<T?>? */)
|
bar<@FlexibleNullability T?>(j = a /*as Function1<@ParameterName(...) @FlexibleNullability T?, @FlexibleNullability T?> */ /*-> @FlexibleNullability J<@FlexibleNullability T?>? */)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test8(efn: @ExtensionFunctionType Function1<String, String>): J<@FlexibleNullability String?> {
|
fun test8(efn: @ExtensionFunctionType Function1<String, String>): J<@FlexibleNullability String?> {
|
||||||
|
|||||||
+60
-32
@@ -22,129 +22,156 @@ fun produceFun(): Function0<Unit> {
|
|||||||
|
|
||||||
fun testSimple(fn: Function0<Unit>) {
|
fun testSimple(fn: Function0<Unit>) {
|
||||||
useSuspend(sfn = { //BLOCK
|
useSuspend(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0() {
|
local suspend fun Function0<Unit>.suspendConversion0() {
|
||||||
fn.invoke()
|
callee.invoke()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testSimpleNonVal() {
|
fun testSimpleNonVal() {
|
||||||
useSuspend(sfn = { //BLOCK
|
useSuspend(sfn = { //BLOCK
|
||||||
val tmp0: Function0<Unit> = produceFun()
|
local suspend fun Function0<Unit>.suspendConversion0() {
|
||||||
local suspend fun suspendConversion1() {
|
callee.invoke()
|
||||||
tmp0.invoke()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testExtAsExt(fn: @ExtensionFunctionType Function1<Int, Unit>) {
|
fun testExtAsExt(fn: @ExtensionFunctionType Function1<Int, Unit>) {
|
||||||
useSuspendExt(sfn = { //BLOCK
|
useSuspendExt(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: Int) {
|
local suspend fun @ExtensionFunctionType Function1<Int, Unit>.suspendConversion0(p0: Int) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testExtAsSimple(fn: @ExtensionFunctionType Function1<Int, Unit>) {
|
fun testExtAsSimple(fn: @ExtensionFunctionType Function1<Int, Unit>) {
|
||||||
useSuspendArg(sfn = { //BLOCK
|
useSuspendArg(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: Int) {
|
local suspend fun Function1<Int, Unit>.suspendConversion0(p0: Int) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testSimpleAsExt(fn: Function1<Int, Unit>) {
|
fun testSimpleAsExt(fn: Function1<Int, Unit>) {
|
||||||
useSuspendExt(sfn = { //BLOCK
|
useSuspendExt(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: Int) {
|
local suspend fun @ExtensionFunctionType Function1<Int, Unit>.suspendConversion0(p0: Int) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testSimpleAsSimpleT(fn: Function1<Int, Unit>) {
|
fun testSimpleAsSimpleT(fn: Function1<Int, Unit>) {
|
||||||
useSuspendArgT<Int>(sfn = { //BLOCK
|
useSuspendArgT<Int>(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: Int) {
|
local suspend fun Function1<Int, Unit>.suspendConversion0(p0: Int) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testSimpleAsExtT(fn: Function1<Int, Unit>) {
|
fun testSimpleAsExtT(fn: Function1<Int, Unit>) {
|
||||||
useSuspendExtT<Int>(sfn = { //BLOCK
|
useSuspendExtT<Int>(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: Int) {
|
local suspend fun @ExtensionFunctionType Function1<Int, Unit>.suspendConversion0(p0: Int) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testExtAsSimpleT(fn: @ExtensionFunctionType Function1<Int, Unit>) {
|
fun testExtAsSimpleT(fn: @ExtensionFunctionType Function1<Int, Unit>) {
|
||||||
useSuspendArgT<Int>(sfn = { //BLOCK
|
useSuspendArgT<Int>(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: Int) {
|
local suspend fun Function1<Int, Unit>.suspendConversion0(p0: Int) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testExtAsExtT(fn: @ExtensionFunctionType Function1<Int, Unit>) {
|
fun testExtAsExtT(fn: @ExtensionFunctionType Function1<Int, Unit>) {
|
||||||
useSuspendExtT<Int>(sfn = { //BLOCK
|
useSuspendExtT<Int>(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: Int) {
|
local suspend fun @ExtensionFunctionType Function1<Int, Unit>.suspendConversion0(p0: Int) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <S : Any?> testSimpleSAsSimpleT(fn: Function1<S, Unit>) {
|
fun <S : Any?> testSimpleSAsSimpleT(fn: Function1<S, Unit>) {
|
||||||
useSuspendArgT<S>(sfn = { //BLOCK
|
useSuspendArgT<S>(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: S) {
|
local suspend fun Function1<S, Unit>.suspendConversion0(p0: S) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <S : Any?> testSimpleSAsExtT(fn: Function1<S, Unit>) {
|
fun <S : Any?> testSimpleSAsExtT(fn: Function1<S, Unit>) {
|
||||||
useSuspendExtT<S>(sfn = { //BLOCK
|
useSuspendExtT<S>(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: S) {
|
local suspend fun @ExtensionFunctionType Function1<S, Unit>.suspendConversion0(p0: S) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <S : Any?> testExtSAsSimpleT(fn: @ExtensionFunctionType Function1<S, Unit>) {
|
fun <S : Any?> testExtSAsSimpleT(fn: @ExtensionFunctionType Function1<S, Unit>) {
|
||||||
useSuspendArgT<S>(sfn = { //BLOCK
|
useSuspendArgT<S>(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: S) {
|
local suspend fun Function1<S, Unit>.suspendConversion0(p0: S) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <S : Any?> testExtSAsExtT(fn: @ExtensionFunctionType Function1<S, Unit>) {
|
fun <S : Any?> testExtSAsExtT(fn: @ExtensionFunctionType Function1<S, Unit>) {
|
||||||
useSuspendExtT<S>(sfn = { //BLOCK
|
useSuspendExtT<S>(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0(p0: S) {
|
local suspend fun @ExtensionFunctionType Function1<S, Unit>.suspendConversion0(p0: S) {
|
||||||
fn.invoke(p1 = p0)
|
callee.invoke(p1 = p0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testSmartCastWithSuspendConversion(a: Any) {
|
fun testSmartCastWithSuspendConversion(a: Any) {
|
||||||
a as Function0<Unit> /*~> Unit */
|
a as Function0<Unit> /*~> Unit */
|
||||||
useSuspend(sfn = { //BLOCK
|
useSuspend(sfn = { //BLOCK
|
||||||
local suspend fun suspendConversion0() {
|
local suspend fun Function0<Unit>.suspendConversion0() {
|
||||||
a /*as Function0<Unit> */.invoke()
|
callee.invoke()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,11 +179,12 @@ fun testSmartCastOnVarWithSuspendConversion(a: Any) {
|
|||||||
var b: Any = a
|
var b: Any = a
|
||||||
b as Function0<Unit> /*~> Unit */
|
b as Function0<Unit> /*~> Unit */
|
||||||
useSuspend(sfn = { //BLOCK
|
useSuspend(sfn = { //BLOCK
|
||||||
val tmp0: Function0<Unit> = b /*as Function0<Unit> */
|
local suspend fun Function0<Unit>.suspendConversion0() {
|
||||||
local suspend fun suspendConversion1() {
|
callee.invoke()
|
||||||
tmp0.invoke()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::suspendConversion0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ data class A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return #x.hashCode().times(other = 31).plus(other = #y.hashCode())
|
var result: Int = #x.hashCode()
|
||||||
|
result = result.times(other = 31).plus(other = #y.hashCode())
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override operator fun equals(other: Any?): Boolean {
|
override operator fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
fun <T : Any?> problematic(lss: List<List<T>>): List<T> {
|
fun <T : Any?> problematic(lss: List<List<T>>): List<T> {
|
||||||
return flatMap<List<T>, T?>($receiver = lss, transform = local fun <anonymous>(it: List<T>): List<T?>? {
|
return flatMap<List<T>, @FlexibleNullability T?>($receiver = lss, transform = local fun <anonymous>(it: List<T>): @EnhancedNullability MutableList<@FlexibleNullability T?> {
|
||||||
return id<T?>(v = it) /*!! List<T?> */
|
return id<@FlexibleNullability T?>(v = it) /*!! List<@FlexibleNullability T?> */
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
fun <K1 : Any?, V1 : Any?> Map<out K1, V1>.plus(pair: Pair<K1, V1>): Map<K1, V1> {
|
fun <K1 : Any?, V1 : Any?> Map<out K1, V1>.plus(pair: Pair<K1, V1>): Map<K1, V1> {
|
||||||
return when {
|
return when {
|
||||||
<this>.isEmpty() -> mapOf<K1, V1>(pair = pair)
|
<this>.isEmpty() -> mapOf<K1, V1>(pair = pair)
|
||||||
true -> apply<LinkedHashMap<K1?, V1?>>($receiver = TODO("IrConstructorCall"), block = local fun LinkedHashMap<K1?, V1?>.<anonymous>() {
|
true -> apply<LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>>($receiver = TODO("IrConstructorCall"), block = local fun LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>.<anonymous>() {
|
||||||
<this>.put(key = pair.<get-first>(), value = pair.<get-second>()) /*~> Unit */
|
<this>.put(key = pair.<get-first>(), value = pair.<get-second>()) /*~> Unit */
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Vendored
+12
-12
@@ -59,7 +59,7 @@ class Q<T1 : Any?, T2 : Any?> {
|
|||||||
|
|
||||||
fun test1() {
|
fun test1() {
|
||||||
// COMPOSITE {
|
// COMPOSITE {
|
||||||
val tmp0_container: P? = notNullP()
|
val tmp0_container: @EnhancedNullability P = notNullP()
|
||||||
val x: Int = tmp0_container /*!! P */.component1()
|
val x: Int = tmp0_container /*!! P */.component1()
|
||||||
val y: Int = tmp0_container /*!! P */.component2()
|
val y: Int = tmp0_container /*!! P */.component2()
|
||||||
// }
|
// }
|
||||||
@@ -68,34 +68,34 @@ fun test1() {
|
|||||||
|
|
||||||
fun test2() {
|
fun test2() {
|
||||||
// COMPOSITE {
|
// COMPOSITE {
|
||||||
val tmp0_container: @FlexibleNullability Q<@NotNull(...) String?, @NotNull(...) String?>? = notNullComponents()
|
val tmp0_container: @FlexibleNullability Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String>? = notNullComponents()
|
||||||
val x: @NotNull(...) String? = tmp0_container /*!! Q<@NotNull(...) String?, @NotNull(...) String?> */.component1()
|
val x: @NotNull(...) @EnhancedNullability String = tmp0_container /*!! Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String> */.component1()
|
||||||
val y: @NotNull(...) String? = tmp0_container /*!! Q<@NotNull(...) String?, @NotNull(...) String?> */.component2()
|
val y: @NotNull(...) @EnhancedNullability String = tmp0_container /*!! Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String> */.component2()
|
||||||
// }
|
// }
|
||||||
use(x = x /*!! @NotNull(...) String */, y = y /*!! @NotNull(...) String */)
|
use(x = x /*!! @NotNull(...) String */, y = y /*!! @NotNull(...) String */)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test2Desugared() {
|
fun test2Desugared() {
|
||||||
val tmp: @FlexibleNullability Q<@NotNull(...) String?, @NotNull(...) String?>? = notNullComponents()
|
val tmp: @FlexibleNullability Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String>? = notNullComponents()
|
||||||
val x: @NotNull(...) String = tmp /*!! Q<@NotNull(...) String?, @NotNull(...) String?> */.component1() /*!! @NotNull(...) String */
|
val x: @NotNull(...) String = tmp /*!! Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String> */.component1() /*!! @NotNull(...) String */
|
||||||
val y: @NotNull(...) String = tmp /*!! Q<@NotNull(...) String?, @NotNull(...) String?> */.component2() /*!! @NotNull(...) String */
|
val y: @NotNull(...) String = tmp /*!! Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String> */.component2() /*!! @NotNull(...) String */
|
||||||
use(x = x, y = y)
|
use(x = x, y = y)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test3() {
|
fun test3() {
|
||||||
// COMPOSITE {
|
// COMPOSITE {
|
||||||
val tmp0_container: Q<@NotNull(...) String?, @NotNull(...) String?>? = notNullQAndComponents()
|
val tmp0_container: @EnhancedNullability Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String> = notNullQAndComponents()
|
||||||
val x: @NotNull(...) String? = tmp0_container /*!! Q<@NotNull(...) String?, @NotNull(...) String?> */.component1()
|
val x: @NotNull(...) @EnhancedNullability String = tmp0_container /*!! Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String> */.component1()
|
||||||
val y: @NotNull(...) String? = tmp0_container /*!! Q<@NotNull(...) String?, @NotNull(...) String?> */.component2()
|
val y: @NotNull(...) @EnhancedNullability String = tmp0_container /*!! Q<@NotNull(...) @EnhancedNullability String, @NotNull(...) @EnhancedNullability String> */.component2()
|
||||||
// }
|
// }
|
||||||
use(x = x /*!! @NotNull(...) String */, y = y /*!! @NotNull(...) String */)
|
use(x = x /*!! @NotNull(...) String */, y = y /*!! @NotNull(...) String */)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test4() {
|
fun test4() {
|
||||||
// COMPOSITE {
|
// COMPOSITE {
|
||||||
val tmp0_container: IndexedValue<@NotNull(...) P?> = first<IndexedValue<@NotNull(...) P?>>($receiver = withIndex<@NotNull(...) P?>($receiver = listOfNotNull() /*!! List<@NotNull(...) P?> */))
|
val tmp0_container: IndexedValue<@NotNull(...) @EnhancedNullability P> = first<IndexedValue<@NotNull(...) @EnhancedNullability P>>($receiver = withIndex<@NotNull(...) @EnhancedNullability P>($receiver = listOfNotNull() /*!! List<@NotNull(...) @EnhancedNullability P> */))
|
||||||
val x: Int = tmp0_container.component1()
|
val x: Int = tmp0_container.component1()
|
||||||
val y: @NotNull(...) P? = tmp0_container.component2()
|
val y: @NotNull(...) @EnhancedNullability P = tmp0_container.component2()
|
||||||
// }
|
// }
|
||||||
use(x = x, y = y /*!! @NotNull(...) P */)
|
use(x = x, y = y /*!! @NotNull(...) P */)
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-12
@@ -3,9 +3,9 @@ fun use(s: P) {
|
|||||||
|
|
||||||
fun testForInListUnused() {
|
fun testForInListUnused() {
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
val tmp0_iterator: MutableIterator<@NotNull(...) P?> = listOfNotNull() /*!! List<@NotNull(...) P?> */ /*as MutableList<*> */.iterator()
|
val tmp0_iterator: MutableIterator<@NotNull(...) @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull(...) @EnhancedNullability P> */ /*as MutableList<*> */.iterator()
|
||||||
while (tmp0_iterator.hasNext()) { //BLOCK
|
while (tmp0_iterator.hasNext()) { //BLOCK
|
||||||
val x: @NotNull(...) P? = tmp0_iterator.next()
|
val x: @NotNull(...) @EnhancedNullability P = tmp0_iterator.next()
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,9 +14,9 @@ fun testForInListUnused() {
|
|||||||
|
|
||||||
fun testForInListDestructured() {
|
fun testForInListDestructured() {
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
val tmp0_iterator: MutableIterator<@NotNull(...) P?> = listOfNotNull() /*!! List<@NotNull(...) P?> */ /*as MutableList<*> */.iterator()
|
val tmp0_iterator: MutableIterator<@NotNull(...) @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull(...) @EnhancedNullability P> */ /*as MutableList<*> */.iterator()
|
||||||
while (tmp0_iterator.hasNext()) { //BLOCK
|
while (tmp0_iterator.hasNext()) { //BLOCK
|
||||||
val tmp1_loop_parameter: @NotNull(...) P? = tmp0_iterator.next()
|
val tmp1_loop_parameter: @NotNull(...) @EnhancedNullability P = tmp0_iterator.next()
|
||||||
val x: Int = tmp1_loop_parameter /*!! @NotNull(...) P */.component1()
|
val x: Int = tmp1_loop_parameter /*!! @NotNull(...) P */.component1()
|
||||||
val y: Int = tmp1_loop_parameter /*!! @NotNull(...) P */.component2()
|
val y: Int = tmp1_loop_parameter /*!! @NotNull(...) P */.component2()
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
@@ -26,7 +26,7 @@ fun testForInListDestructured() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testDesugaredForInList() {
|
fun testDesugaredForInList() {
|
||||||
val iterator: MutableIterator<@NotNull(...) P?> = listOfNotNull() /*!! List<@NotNull(...) P?> */ /*as MutableList<*> */.iterator()
|
val iterator: MutableIterator<@NotNull(...) @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull(...) @EnhancedNullability P> */ /*as MutableList<*> */.iterator()
|
||||||
while (iterator.hasNext()) { //BLOCK
|
while (iterator.hasNext()) { //BLOCK
|
||||||
val x: @NotNull(...) P = iterator.next() /*!! @NotNull(...) P */
|
val x: @NotNull(...) P = iterator.next() /*!! @NotNull(...) P */
|
||||||
}
|
}
|
||||||
@@ -34,9 +34,9 @@ fun testDesugaredForInList() {
|
|||||||
|
|
||||||
fun testForInArrayUnused(j: J) {
|
fun testForInArrayUnused(j: J) {
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
val tmp0_iterator: Iterator<P?> = j.arrayOfNotNull() /*!! Array<out P?> */ /*as Array<P?> */.iterator()
|
val tmp0_iterator: Iterator<@EnhancedNullability P> = j.arrayOfNotNull() /*!! Array<out @EnhancedNullability P> */ /*as Array<@EnhancedNullability P> */.iterator()
|
||||||
while (tmp0_iterator.hasNext()) { //BLOCK
|
while (tmp0_iterator.hasNext()) { //BLOCK
|
||||||
val x: P? = tmp0_iterator.next()
|
val x: @EnhancedNullability P = tmp0_iterator.next()
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,9 +45,9 @@ fun testForInArrayUnused(j: J) {
|
|||||||
|
|
||||||
fun testForInListUse() {
|
fun testForInListUse() {
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
val tmp0_iterator: MutableIterator<@NotNull(...) P?> = listOfNotNull() /*!! List<@NotNull(...) P?> */ /*as MutableList<*> */.iterator()
|
val tmp0_iterator: MutableIterator<@NotNull(...) @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull(...) @EnhancedNullability P> */ /*as MutableList<*> */.iterator()
|
||||||
while (tmp0_iterator.hasNext()) { //BLOCK
|
while (tmp0_iterator.hasNext()) { //BLOCK
|
||||||
val x: @NotNull(...) P? = tmp0_iterator.next()
|
val x: @NotNull(...) @EnhancedNullability P = tmp0_iterator.next()
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
use(s = x /*!! @NotNull(...) P */)
|
use(s = x /*!! @NotNull(...) P */)
|
||||||
use(s = x)
|
use(s = x)
|
||||||
@@ -58,9 +58,9 @@ fun testForInListUse() {
|
|||||||
|
|
||||||
fun testForInArrayUse(j: J) {
|
fun testForInArrayUse(j: J) {
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
val tmp0_iterator: Iterator<P?> = j.arrayOfNotNull() /*!! Array<out P?> */ /*as Array<P?> */.iterator()
|
val tmp0_iterator: Iterator<@EnhancedNullability P> = j.arrayOfNotNull() /*!! Array<out @EnhancedNullability P> */ /*as Array<@EnhancedNullability P> */.iterator()
|
||||||
while (tmp0_iterator.hasNext()) { //BLOCK
|
while (tmp0_iterator.hasNext()) { //BLOCK
|
||||||
val x: P? = tmp0_iterator.next()
|
val x: @EnhancedNullability P = tmp0_iterator.next()
|
||||||
{ //BLOCK
|
{ //BLOCK
|
||||||
use(s = x /*!! P */)
|
use(s = x /*!! P */)
|
||||||
use(s = x)
|
use(s = x)
|
||||||
@@ -114,7 +114,9 @@ data class P {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return #x.hashCode().times(other = 31).plus(other = #y.hashCode())
|
var result: Int = #x.hashCode()
|
||||||
|
result = result.times(other = 31).plus(other = #y.hashCode())
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override operator fun equals(other: Any?): Boolean {
|
override operator fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user