[K2/N] Rework testStdlibFramework to avoid compiler crash due to KT-58459
^KT-58459 Merge-request: KT-MR-10043 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
918a247bcc
commit
c6d9821ef0
@@ -5867,7 +5867,6 @@ if (isAppleTarget(project)) {
|
||||
swiftSources = ['framework/values_generics/']
|
||||
}
|
||||
|
||||
if(!isK2(project)) // KT-56271
|
||||
frameworkTest("testStdlibFramework") {
|
||||
framework('Stdlib') {
|
||||
sources = ['framework/stdlib']
|
||||
|
||||
@@ -72,7 +72,6 @@ fun gc() = kotlin.native.runtime.GC.collect()
|
||||
@Throws(Throwable::class)
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
fun testSet(set: Set<String>) {
|
||||
set as kotlin.native.internal.KonanSet<String> // Smart cast to access getElement below.
|
||||
val setAny: Set<Any?> = set
|
||||
|
||||
assertTrue(set.contains("a"))
|
||||
@@ -80,7 +79,7 @@ fun testSet(set: Set<String>) {
|
||||
assertFalse(set.contains("h"))
|
||||
assertFalse(setAny.contains(1))
|
||||
|
||||
|
||||
set as kotlin.native.internal.KonanSet<String> // Smart cast to access getElement below.
|
||||
assertEquals("a", set.getElement("a"))
|
||||
assertNull(set.getElement("aa"))
|
||||
assertNull((setAny as kotlin.native.internal.KonanSet<Any?>).getElement(1))
|
||||
|
||||
Reference in New Issue
Block a user