mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Previously, diagnostics for arguments of platform conditions (e.g. 'os(macOS)') used to point the condition name position instead of the argument position. Adjust the position to the start of the argument. rdar://124160048
8 lines
398 B
Swift
8 lines
398 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 4
|
|
|
|
/// Reject compound names.
|
|
#if BAR(_:) // expected-error@:5 {{invalid conditional compilation expression}}
|
|
#elseif os(x:)(macOS) // expected-error@:9 {{unexpected platform condition (expected 'os', 'arch', or 'swift')}}
|
|
#elseif os(Linux(foo:bar:)) // expected-error@:12 {{unexpected platform condition argument: expected identifier}}
|
|
#endif
|