Files
swift-mirror/test/Interpreter/capture_unowned.swift
Chris Lattner 5b49d59c57 Remove the @ from @final and @lazy, the last major piece of
rdar://17168115.

Also, reinstate the ARM driver change and testcase that I removed
in my last patch.


Swift SVN r19790
2014-07-10 06:23:27 +00:00

15 lines
359 B
Swift

// RUN: %target-run-simple-swift | FileCheck %s
class C {
let name: String
init(name: String) { self.name = name }
lazy var asString: () -> String = { [unowned self] in return self.name }
deinit { println("deinitializing...") }
}
var c: C? = C(name: "I am a C")
println(c!.asString())
c = nil
// CHECK: I am a C
// CHECK-NEXT: deinitializing...