mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
...instead of relying on the one in the overlay in pre-4.2 versions of Swift. This caused crashes in deserialization, which (deliberately) doesn't respect availability. There are three changes here: - Remove UIEdgeInsets.zero and UIOffset.zero from the UIKit overlay. - Always use the 4.2 name for UIEdgeInsetsZero and UIOffsetZero from the underlying UIKit framework. (This is the nested name.) - Ignore the unavailability messages for those two constants in pre-4.2 Swift, since we're now relying on them being present. The latter two, the compiler changes, can go away once UIKit's API notes no longer specify different pre-4.2 behavior, but meanwhile we need to keep compatibility with the SDKs released in Xcode 10b1. https://bugs.swift.org/browse/SR-7879
11 lines
342 B
Swift
11 lines
342 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift -emit-module-path %t/main4.swiftmodule -swift-version 4 %s
|
|
// RUN: %target-build-swift -emit-module-path %t/main4_2.swiftmodule -swift-version 4.2 %s
|
|
|
|
// REQUIRES: OS=ios
|
|
|
|
import UIKit
|
|
|
|
public func testInsets(_: UIEdgeInsets = .zero) {}
|
|
public func testOffsets(_: UIOffset = .zero) {}
|