@@ -27,6 +27,8 @@ class LastWords {
2727
2828 @objc var implProperty : Int
2929 final var object : LastWords
30+ final weak var defaultNilProperty : AnyObject ?
31+ @objc var defaultIntProperty : Int = 17
3032
3133 @objc class func runTests( ) {
3234 do {
@@ -35,6 +37,7 @@ class LastWords {
3537 print ( " implProperty = " , impl. implProperty)
3638 impl. implProperty = 42
3739 print ( " implProperty = " , impl. implProperty)
40+ print ( " defaultIntProperty = " , impl. defaultIntProperty)
3841 print ( " description = " , impl. description)
3942 }
4043
@@ -44,6 +47,7 @@ class LastWords {
4447 print ( " implProperty = " , swiftSub. implProperty)
4548 swiftSub. implProperty = 42
4649 print ( " implProperty = " , swiftSub. implProperty)
50+ print ( " defaultIntProperty = " , swiftSub. defaultIntProperty)
4751
4852 print ( " otherProperty = " , swiftSub. otherProperty)
4953 swiftSub. otherProperty = 13
@@ -75,11 +79,13 @@ ImplClass.runTests()
7579// CHECK: someMethod = ImplClass.someMethod()
7680// CHECK: implProperty = 0
7781// CHECK: implProperty = 42
82+ // CHECK: defaultIntProperty = 17
7883// CHECK: description = ImplClass(implProperty: 42, object: main.LastWords)
7984// CHECK: ImplClass It's better to burn out than to fade away.
8085// CHECK: someMethod = SwiftSubclass.someMethod()
8186// CHECK: implProperty = 0
8287// CHECK: implProperty = 42
88+ // CHECK: defaultIntProperty = 17
8389// CHECK: otherProperty = 1
8490// CHECK: otherProperty = 13
8591// CHECK: implProperty = 42
0 commit comments