File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1065,7 +1065,8 @@ bool SILDeclRef::canBeDynamicReplacement() const {
1065
1065
bool SILDeclRef::isDynamicallyReplaceable () const {
1066
1066
if (kind == SILDeclRef::Kind::DefaultArgGenerator)
1067
1067
return false ;
1068
- if (isStoredPropertyInitializer ())
1068
+ if (isStoredPropertyInitializer () ||
1069
+ kind == SILDeclRef::Kind::PropertyWrapperBackingInitializer)
1069
1070
return false ;
1070
1071
1071
1072
// Class allocators are not dynamic replaceable.
Original file line number Diff line number Diff line change @@ -404,3 +404,17 @@ public func testWithLocalFun() {
404
404
let unamedClosure = { print ( " foo " ) }
405
405
unamedClosure ( )
406
406
}
407
+
408
+ @propertyWrapper
409
+ struct WrapperWithInitialValue < T> {
410
+ var wrappedValue : T
411
+
412
+ init ( wrappedValue initialValue: T ) {
413
+ self . wrappedValue = initialValue
414
+ }
415
+ }
416
+
417
+ // CHECK-LABEL: sil hidden [ossa] @$s23dynamically_replaceable10SomeStructV1tSbvpfP
418
+ public struct SomeStruct {
419
+ @WrapperWithInitialValue var t = false
420
+ }
You can’t perform that action at this time.
0 commit comments