Files
swift-mirror/test/decl/protocol/conforms/nscoding_availability_osx.swift
Ben Langmuir fd1875dcfb [test] Move availability tests to later fake OS versions
10.50 was once greater than any real macOS version, but now it compares
less than real released versions, which makes these tests depend on the
deployment target unnecessarily. Update these tests to use even larger
numbers to hopefully keep them independent a little longer.
2024-08-21 11:38:54 -07:00

23 lines
772 B
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s -target %target-cpu-apple-macosx50 -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s -target %target-cpu-apple-macosx50 -dump-ast > %t.ast
// RUN: %FileCheck %s < %t.ast
// REQUIRES: objc_interop
// REQUIRES: OS=macosx
import Foundation
// Nested classes that aren't available in our deployment target.
@available(OSX 51, *)
class CodingI : NSObject, NSCoding {
required init(coder: NSCoder) { }
func encode(coder: NSCoder) { }
}
@available(OSX 51, *)
class OuterCodingJ {
// CHECK-NOT: class_decl{{.*}}"NestedJ"{{.*}}@_staticInitializeObjCMetadata
class NestedJ : CodingI { }
}