Skip to content

Commit 5e7b70b

Browse files
committed
[test] Fix-up test for 5.9
1 parent e846570 commit 5e7b70b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/expr/unary/if_expr.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ var d = if .random() { if .random() { 1 } else { 2 } } else { 3 }
371371

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

374-
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}}
374+
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}}
375375

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

test/expr/unary/switch_expr.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ case false:
446446
}
447447

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

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

0 commit comments

Comments
 (0)