Difference between backing and storageWrapper in PropertyWrapper?

Hello I just start to try to understand the build and parse process of property wrapper in compiler?

In swift/ASTContext.cpp at 2e65a14ed43bc959ce45aafbdfd3a3656f83f1cc · apple/swift · GitHub, which just have two PropertyWrapperSynthesizedPropertyKind, what's the different between Backing and StorageWrapper?

I think you're looking at an old version of the source code. The term "storage wrapper" is an artifact of an older design of property wrappers, and much of that code has since been renamed to use the term "projected value". The PR might help: [NFC][Property Wrappers] Rename "storage wrapper var" to "projection var/projected value" by hborla · Pull Request #33777 · apple/swift · GitHub

Terms of Service

Privacy Policy

Cookie Policy