mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
where we don't find an ArcheType in the local context. Fixes rdar://problem/15033772 Swift SVN r8507
15 lines
370 B
Swift
15 lines
370 B
Swift
// RUN: %swift -triple x86_64-apple-darwin10 %s -emit-llvm -g -o - | FileCheck %s
|
|
struct __CurrentErrno {}
|
|
struct CErrorOr<T>
|
|
{
|
|
var value : GenericIVar<Optional<T>>
|
|
init(x : __CurrentErrno) {
|
|
value = GenericIVar(.None)
|
|
}
|
|
func isError() -> Bool {
|
|
// CHECK: _TtGSqQ__
|
|
assert(value.value, "the object should not contain an error")
|
|
return false
|
|
}
|
|
}
|