Files
swift-mirror/validation-test/stdlib/Set.swift
Andrew Trick e2760a7036 Add a return statement to Variant[Set|Dictionary]Storage.removeAtIndex.
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
2015-01-16 21:10:48 +00:00

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()