File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -437,17 +437,41 @@ struct SR_11477_W {
437
437
}
438
438
}
439
439
440
+ @propertyWrapper
441
+ struct SR_11477_W1 {
442
+ let name : String
443
+
444
+ init ( ) {
445
+ self . name = " Init "
446
+ }
447
+
448
+ init ( name: String = " DefaultParamInit " ) {
449
+ self . name = name
450
+ }
451
+
452
+ var wrappedValue : Int {
453
+ get { return 0 }
454
+ }
455
+ }
456
+
440
457
struct SR_11477_C {
441
458
@SR_11477_W var property : Int
459
+ @SR_11477_W1 var property1 : Int
460
+
442
461
init ( ) { }
443
462
func foo( ) { print ( _property. name) }
463
+ func foo1( ) { print ( _property1. name) }
444
464
}
445
465
446
466
func testWrapperInitWithDefaultArg( ) {
467
+ // CHECK: ## InitWithDefaultArg
468
+ print ( " \n ## InitWithDefaultArg " )
447
469
let use = SR_11477_C ( )
448
470
449
471
use. foo ( )
450
- // CHECK: DefaultParamInit
472
+ use. foo1 ( )
473
+ // CHECK-NEXT: DefaultParamInit
474
+ // CHECK-NEXT: Init
451
475
}
452
476
453
477
testIntStruct ( )
You can’t perform that action at this time.
0 commit comments