Skip to content

Commit 7af257a

Browse files
committed
Only test NSObject interop on Obj-C platforms
1 parent c078479 commit 7af257a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/Casting/Casts.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,11 +1064,13 @@ CastsTests.test("Don't put AnyHashable inside AnyObject") {
10641064
expectTrue(a === d)
10651065
}
10661066

1067+
#if _runtime(_ObjC)
10671068
CastsTests.test("__SwiftValue should not be obvious to `is`") {
10681069
struct S {}
10691070
let s = S() as AnyObject
10701071
expectFalse(s is NSObject)
10711072
}
1073+
#endif
10721074

10731075
CastsTests.test("type(of:) should look through __SwiftValue")
10741076
.xfail(.always("Known to be broken"))

0 commit comments

Comments
 (0)