From f82c3c3bf70146b10c4af1ec18238e5694efeca8 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 26 Oct 2023 11:20:02 +0200 Subject: [PATCH] K2: add test confirming finished migration in KT-33917 Related to KT-62918, KT-60086 --- .../exposed/ambiguousAnonymousExposed.fir.kt | 5 +++++ .../exposed/ambiguousAnonymousExposed.fir.txt | 18 ++++++++++++++++++ .../tests/exposed/ambiguousAnonymousExposed.kt | 5 +++++ 3 files changed, 28 insertions(+) diff --git a/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.fir.kt b/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.fir.kt index 766f4388782..6fe47324115 100644 --- a/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.fir.kt +++ b/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.fir.kt @@ -12,3 +12,8 @@ fun fooFoo(): My = My(object : I1, I2 {}) internal fun bar() = My(object : I1, I2 {}) private fun baz() = My(object : I1, I2 {}) + +// See also KT-33917 +private inline fun bazBaz() = My(object : I1, I2 {}) + +private inline fun bazBazBaz() = My(object : I1 {}) diff --git a/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.fir.txt b/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.fir.txt index ed8e8f853e3..8a0dcf1143b 100644 --- a/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.fir.txt +++ b/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.fir.txt @@ -48,3 +48,21 @@ FILE: ambiguousAnonymousExposed.fir.kt } ) } + private final inline fun bazBaz(): R|My| { + ^bazBaz R|/My.My||>(object : R|I1|, R|I2| { + private constructor(): R|| { + super() + } + + } + ) + } + private final inline fun bazBazBaz(): R|My| { + ^bazBazBaz R|/My.My||>(object : R|I1| { + private constructor(): R|| { + super() + } + + } + ) + } diff --git a/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.kt b/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.kt index 11a392bbf4b..8c62d205a3a 100644 --- a/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.kt +++ b/compiler/testData/diagnostics/tests/exposed/ambiguousAnonymousExposed.kt @@ -12,3 +12,8 @@ fun fooFoo(): My = My(object : I1, I2 {}) internal fun bar() = My(object : I1, I2 {}) private fun baz() = My(object : I1, I2 {}) + +// See also KT-33917 +private inline fun bazBaz() = My(object : I1, I2 {}) + +private inline fun bazBazBaz() = My(object : I1 {})