mirror of
https://github.com/apple/swift.git
synced 2026-06-27 12:25:55 +02:00
b7d17b25ba
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
15 lines
342 B
Swift
15 lines
342 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
protocol P {
|
|
func foo(_ truth: Bool = false) // expected-error{{default argument not permitted in a protocol method}}
|
|
}
|
|
|
|
struct X : P {
|
|
func foo(_ truth: Bool = false) {
|
|
}
|
|
}
|
|
|
|
protocol Q {
|
|
init(truth: Bool = false) // expected-error{{default argument not permitted in a protocol initializer}}
|
|
}
|