mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
It's likely that these were listed as "REQUIRES: OS=macosx" to not redundantly run them for iOS et al, but they don't take that long and so it's more useful for Linux devs to be able to run them locally if need be. Or to catch something that really is different on non-macOS.
20 lines
584 B
Plaintext
20 lines
584 B
Plaintext
// RUN: %scale-test --sum-multi --begin 5 --end 16 --step 5 --select Sema.IsObjCRequest -Xfrontend=-enable-objc-interop -Xfrontend=-disable-objc-attr-requires-foundation-module %s
|
|
// REQUIRES: asserts
|
|
|
|
class C${N} {
|
|
// This is the member we actually have to validate; we only want there
|
|
// to be one definition:
|
|
% if int(N) == 1:
|
|
@objc func isObjCMember() {}
|
|
% end
|
|
|
|
// Other random @objc and non-@objc members; the test ensures that we're
|
|
// not touching these:
|
|
func isAnotherObjCMember() {}
|
|
func isNonObjCMember() {}
|
|
}
|
|
|
|
func f${N}(a: AnyObject) {
|
|
a.isObjCMember!()
|
|
}
|