ITADN

@Table expansion missing ) if there is a comment after an assignment

#193Openajaxharg 创建于 2025-10-01
A
ajaxhargcommented
### Description If the following code is written ``` @Table struct myThing { let id : Int // This comment is ok. var title: String // This comment is ok var name = "" // This comment will cause the compile to fail. var flag = 0 // This will fail } ``` the Macro code will fail to compile with the error Expected ) in expressionlist. ### Checklist - [x] I have determined whether this bug is also reproducible in a vanilla SwiftUI project. - [ ] I have determined whether this bug is also reproducible in a vanilla GRDB project. - [x] If possible, I've reproduced the issue using the `main` branch of this package. - [x] This issue hasn't been addressed in an [existing GitHub issue](https://github.com/pointfreeco/sqlite-data/issues) or [discussion](https://github.com/pointfreeco/sqlite-data/discussions). ### Expected behavior The closing brace to be included in the expression generated by @Table ### Actual behavior A closing brace is missing in the macro code. ### Reproducing project [bugInTable.zip](https://github.com/user-attachments/files/22635177/bugInTable.zip) ### SQLiteData version information _No response_ ### Sharing version information _No response_ ### GRDB version information _No response_ ### Destination operating system iOS 26 ### Xcode version information 26.0.1 ### Swift Compiler version information ```shell swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1) Target: arm64-apple-macosx26.0 ```
1 条评论