[IR] Add context receiver test on MFVC

Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
This commit is contained in:
Evgeniy.Zhelenskiy
2022-10-11 00:13:00 +02:00
committed by Space Team
parent fe1647096f
commit 0c70b60988
13 changed files with 56 additions and 44 deletions
@@ -1,6 +0,0 @@
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses, +ContextReceivers
class A
context(A)
inline class B(val x: Int)
@@ -1,6 +0,0 @@
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses, +ContextReceivers
class A
<!INLINE_CLASS_CANNOT_HAVE_CONTEXT_RECEIVERS!>context(A)<!>
inline class B(val x: Int)
@@ -1,16 +0,0 @@
package
public final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
context(A) public final inline class B {
public constructor B(/*0*/ x: kotlin.Int)
public final val x: kotlin.Int
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
}
@@ -0,0 +1,19 @@
// !LANGUAGE: +ContextReceivers, +ValueClasses
// WITH_STDLIB
// SKIP_TXT
// WORKS_WHEN_VALUE_CLASS
@file:Suppress("INLINE_CLASS_DEPRECATED")
class A
context(A)
inline class B1(val x: Int)
context(A)
OPTIONAL_JVM_INLINE_ANNOTATION
value class B2(val x: Int)
context(A)
OPTIONAL_JVM_INLINE_ANNOTATION
value class C(val x: Int, val y: Int)
@@ -0,0 +1,19 @@
// !LANGUAGE: +ContextReceivers, +ValueClasses
// WITH_STDLIB
// SKIP_TXT
// WORKS_WHEN_VALUE_CLASS
@file:Suppress("INLINE_CLASS_DEPRECATED")
class A
<!VALUE_CLASS_CANNOT_HAVE_CONTEXT_RECEIVERS!>context(A)<!>
inline class B1(val x: Int)
<!VALUE_CLASS_CANNOT_HAVE_CONTEXT_RECEIVERS!>context(A)<!>
OPTIONAL_JVM_INLINE_ANNOTATION
value class B2(val x: Int)
<!VALUE_CLASS_CANNOT_HAVE_CONTEXT_RECEIVERS!>context(A)<!>
OPTIONAL_JVM_INLINE_ANNOTATION
value class C(val x: Int, val y: Int)