mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Extend NSNumber bridging to cover not only `Int`, `UInt`, `Double`, and `Bool`, but all of the standard types as well. Extend the `TypePreservingNSNumber` subclass to accommodate all of these types, so that we preserve type identity for `AnyHashable` and dynamic casting of Swift-bridged NSNumbers. If a pure Cocoa NSNumber is cast, just trust that the user knows what they're doing. This XFAILs a couple of serialization tests that attempt to build the Foundation overlay, but which don't properly handle `gyb` files.
11 lines
741 B
Swift
11 lines
741 B
Swift
// RUN: %target-build-swift -module-name Foundation -parse-as-library %S/../../stdlib/public/SDK/Foundation/*.swift -emit-module-path %t.1.swiftmodule
|
|
// RUN: %target-build-swift -module-name Foundation -parse-as-library %S/../../stdlib/public/SDK/Foundation/*.swift -emit-module-path %t.2.swiftmodule
|
|
// RUN: diff <(llvm-bcanalyzer -dump %t.1.swiftmodule | sed -e 's/\.[0-9]\.swiftmodule/\.x\.swiftmodule/g') <(llvm-bcanalyzer -dump %t.2.swiftmodule | sed -e 's/\.[0-9]\.swiftmodule/\.x\.swiftmodule/g')
|
|
// XFAIL: *
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
// Compiling the same set of files twice, without modifying them (and without
|
|
// generating inlineable SIL) should produce the same swiftmodule. We don't
|
|
// promise more than that at this time...
|