mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
9 lines
301 B
Swift
9 lines
301 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
func noConditionNoElse() {
|
|
guard {} // expected-error {{missing condition in 'guard' statement}} expected-error {{expected 'else' after 'guard' condition}}
|
|
}
|
|
func noCondition() {
|
|
guard else {} // expected-error {{missing condition in 'guard' statement}}
|
|
}
|