mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
418 B
Swift
15 lines
418 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -index-store-path %t/idx -o %t/file.o -typecheck -primary-file %s -verify
|
|
|
|
// https://github.com/apple/swift/issues/55439
|
|
|
|
protocol MyProto {
|
|
func compile() throws
|
|
}
|
|
|
|
func compile(x: MyProto) throws {
|
|
try x.compile
|
|
// expected-error@-1 {{function is unused}}
|
|
// expected-warning@-2 {{no calls to throwing functions occur within 'try' expression}}
|
|
}
|