Skip to content

Commit

Permalink
[test] Fix-up test for 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishknight committed Sep 20, 2023
1 parent e846570 commit 5e7b70b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/expr/unary/if_expr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ var d = if .random() { if .random() { 1 } else { 2 } } else { 3 }

d = if .random() { 0 } else { 1 }

let e = "\(if .random() { 1 } else { 2 })" // expected-error {{'if' may only be used as expression in return, throw, or as the source of an assignment}}
let e = "\(if .random() { 1 } else { 2 })" // expected-error 2{{'if' may only be used as expression in return, throw, or as the source of an assignment}}

let f = { if .random() { 1 } else { 2 } }

Expand Down
2 changes: 1 addition & 1 deletion test/expr/unary/switch_expr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ case false:
}

let e = "\(switch Bool.random() { case true: 1 case false: 2 })"
// expected-error@-1 {{'switch' may only be used as expression in return, throw, or as the source of an assignment}}
// expected-error@-1 2{{'switch' may only be used as expression in return, throw, or as the source of an assignment}}

let f = { switch Bool.random() { case true: 1 case false: 2 } }

Expand Down

0 comments on commit 5e7b70b

Please sign in to comment.