mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Un-reverts 9c01ee2c1b.
Also, add myself as a reviewer for more availability related files.
NFC.
24 lines
671 B
Swift
24 lines
671 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t --leading-lines
|
|
|
|
// RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm \
|
|
// RUN: %t/FileA.swift %t/FileB.swift \
|
|
// RUN: -define-availability "_justAName" \
|
|
// RUN: 2>&1 | %FileCheck %s
|
|
|
|
// CHECK: -define-availability argument:1:11: error: expected ':' after '_justAName' in availability macro definition
|
|
// CHECK-NEXT: _justAName
|
|
|
|
/// It's parsed once so the diagnostic is produced once as well.
|
|
// CHECK-NOT: _justAName
|
|
|
|
//--- FileA.swift
|
|
|
|
@available(_triggerParsingMacros)
|
|
public func brokenPlatforms() {}
|
|
|
|
//--- FileB.swift
|
|
|
|
@available(_triggerParsingMacros)
|
|
public func brokenPlatforms() {}
|