Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0016-rdar21437203.swift
Jordan Rose 6dea23a029 Flip the switch on 'private' and 'fileprivate' (SE-0025).
More tests to come soon. In particular, validation of members used in
protocol conformances is still not correct.
2016-07-28 09:55:23 -07:00

31 lines
474 B
Swift

// RUN: %target-swift-frontend %s -emit-silgen
struct Curds {
var whey: AnyObject? = nil
}
private class Butter {
fileprivate func churn<T>(block: () throws -> T) throws -> T {
return try block()
}
}
struct Cow {
private var b : Butter
init() {
self.b = Butter()
}
func cheese() throws {
let a = Curds()
let b = Curds()
let c = Curds()
var err = 0
var newChild = 0
defer { }
try self.b.churn { return () }
}
}