Files
swift-mirror/validation-test/compiler_crashers_2_fixed/sr12994.swift
2021-01-15 22:14:56 +09:00

13 lines
370 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -index-store-path %t/idx -o %t/file.o -typecheck -primary-file %s -verify
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}}
}