mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
OSSA modules are enabled by default. The compiler still accepts this option but it has no effect.
17 lines
239 B
Swift
17 lines
239 B
Swift
// RUN: %target-swift-frontend -O %s -emit-sil -o /dev/null
|
|
|
|
public class X {}
|
|
|
|
public func testit(_ s: [X]) -> X? {
|
|
var r: X?
|
|
for e in s {
|
|
if r == nil {
|
|
r = e
|
|
} else if e !== r {
|
|
return nil
|
|
}
|
|
}
|
|
return r
|
|
}
|
|
|