Skip to content

Commit 92e6608

Browse files
committed
test
1 parent 9ee93d9 commit 92e6608

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/Constraints/pack-expansion-expressions.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,3 +604,16 @@ func test_that_expansions_are_bound_early() {
604604
})
605605
}
606606
}
607+
608+
do {
609+
func test<T>(x: T) {}
610+
611+
// rdar://110711746 to make this valid
612+
func caller1<each T>(x: repeat each T) {
613+
_ = (repeat { test(x: each x) }()) // expected-error {{pack reference 'each T' can only appear in pack expansion}}
614+
}
615+
616+
func caller2<each T>(x: repeat each T) {
617+
_ = { (repeat test(x: each x)) }()
618+
}
619+
}

0 commit comments

Comments
 (0)