Files
swift-mirror/test/decl/protocol/protocol_with_default_args.swift
David Farler b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00

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}}
}