mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This fast path is only taken when the code is specialized. Fixes <rdar://problem/19331717> Optimizer breaks Set<T> and Dictionary<K, V> Swift SVN r24479
11 lines
286 B
Swift
11 lines
286 B
Swift
// RUN: %target-build-swift -Xfrontend -disable-access-control -module-name a %s -o %t.out -O
|
|
// RUN: %target-run %t.out
|
|
|
|
// <rdar://19331717> Optimizer breaks Set<T> and Dictionary<K, V>
|
|
func f() {
|
|
var s: Set<Int> = [ 10 ]
|
|
let index = s.indexOf(10)!
|
|
s.removeAtIndex(index)
|
|
}
|
|
f()
|