mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These are tests that fail in the next commit without this flag. This does not add -verify-ignore-unrelated to all tests with -verify, only the ones that would fail without it. This is NFC since this flag is currently a no-op.
22 lines
1.0 KiB
Swift
22 lines
1.0 KiB
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -verify-ignore-unrelated -I %S/Inputs/custom-modules %s
|
|
|
|
// REQUIRES: OS=macosx
|
|
|
|
import Foundation
|
|
|
|
func variadicFunc2(_ A : Int32, _: Any...) -> Int { return 0 }
|
|
|
|
class C1 {}
|
|
|
|
func test_unavailable_because_variadic() {
|
|
print(variadicFunc1(2, [3])) // expected-error {{'variadicFunc1' is unavailable: Variadic function is unavailable}}
|
|
print(variadicFunc1(2, [3], C1())) // expected-error {{'variadicFunc1' is unavailable: Variadic function is unavailable}}
|
|
print(variadicFunc1(2, 3, 3, 4)) // expected-error {{'variadicFunc1' is unavailable: Variadic function is unavailable}}
|
|
print(variadicFunc1(2, 3, [3], 4)) // expected-error {{'variadicFunc1' is unavailable: Variadic function is unavailable}}
|
|
print(variadicFunc2(2, [3])) // no-error
|
|
print(variadicFunc2(2, 3)) // no-error
|
|
print(variadicFunc2(2, 3, C1())) // no-error
|
|
print(variadicFunc2(2, 3, 4, 5, 6)) // no-error
|
|
print(variadicFunc2(2, [3], [4], 5, 6)) // no-error
|
|
}
|