mirror of
https://github.com/apple/swift.git
synced 2026-10-04 11:58:22 +02:00
15 lines
325 B
Swift
15 lines
325 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
@available(*, deprecated)
|
|
func bar() -> [Int] { return [1,2,3] }
|
|
|
|
@diagnose(DeprecatedDeclaration, as: error)
|
|
func foo() -> [Int] {
|
|
return bar() // expected-error {{'bar()' is deprecated}}
|
|
}
|
|
|
|
@diagnose(DeprecatedDeclaration, as: ignored)
|
|
func baz() -> [Int] {
|
|
return bar()
|
|
}
|