Commit e76293d
committed
fix: add support for negative enum values
Copilot review identified that negative values like -1 were being
incorrectly parsed as 0. Added UnaryExpr handling in processExplicitValue
to properly support negative number literals.
Also fixed test expectation for SQL NULL handling with Priority enum
where PriorityLow (0) is the zero value, not PriorityNone (-1).1 parent 6c08a6e commit e76293d
File tree
4 files changed
+16
-5
lines changed- internal/generator
- testdata/integration
4 files changed
+16
-5
lines changedBinary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
252 | 264 | | |
253 | 265 | | |
254 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments