SwiftyLab / MetaCodable

Supercharge Swift's Codable implementations with macros meta-programming.
https://swiftpackageindex.com/SwiftyLab/MetaCodable/main/documentation/metacodable
MIT License
604 stars 22 forks source link

fix: @Codable fails in structs with static members. #37

Closed Midbin closed 10 months ago

Midbin commented 10 months ago

This fixes #26.

Please note that I ran into, what I think, is a small swift compiler bug. My workaround is in RegistrationAttribut.swift:45-52 and StaticVariableDeclaration.swift:46-50.

This is based on #34 because it also adds new tests and I will rebase this PR when #34 lands.

soumyamahunt commented 10 months ago

@Midbin please run swift-format as well:

swift run swift-format --in-place --ignore-unparsable-files --recursive Sources Tests