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.
21 lines
1.0 KiB
Swift
21 lines
1.0 KiB
Swift
// RUN: %swift %clang-importer-sdk -target %target-cpu-apple-macosx51 -typecheck %s -verify -verify-ignore-unrelated
|
|
// RUN: %swift %clang-importer-sdk -target %target-cpu-apple-macosx52 -typecheck %s -verify -verify-ignore-unrelated
|
|
|
|
// REQUIRES: OS=macosx
|
|
import Foundation
|
|
import user_objc
|
|
|
|
// Ignore deprecated constants in prefix stripping, even if they aren't deprecated /yet/.
|
|
let calendarUnits: NSCalendar.Unit = [.era, .year, .calendar]
|
|
let calendarUnits2: NSCalendar.Unit = [.NSMonthCalendarUnit, .NSYearCalendarUnit] // expected-error 2 {{unavailable}}
|
|
// ...unless they're all deprecated.
|
|
let calendarUnitsDep: NSCalendarUnitDeprecated = [.eraCalendarUnitDeprecated, .yearCalendarUnitDeprecated] // expected-error 2 {{unavailable}}
|
|
|
|
// rdar://problem/21081557
|
|
func pokeRawValue(_ random: SomeRandomEnum) {
|
|
switch (random) {
|
|
case SomeRandomEnum.RawValue // expected-error{{expression pattern of type 'SomeRandomEnum.RawValue.Type' (aka 'Int.Type') cannot match values of type 'SomeRandomEnum'}}
|
|
// expected-error@-1{{expected ':' after 'case'}}
|
|
}
|
|
}
|