Commit bfe9ff9
fix: respect Binder interface for primitive types in BindStringToObject (#86)
Previously, the Binder interface was only checked within the struct case
of the type switch, causing primitive types (strings, ints, etc.) that
implement Binder to bypass their custom binding logic. This fix moves
the Binder check to the beginning of BindStringToObject, ensuring all
types implementing Binder use their custom Bind method, regardless of
their underlying type. The redundant check in the struct case has been
removed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Viktor Stanchev <viktor@anchorlabs.com>1 parent b76a24f commit bfe9ff9
2 files changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| |||
134 | 139 | | |
135 | 140 | | |
136 | 141 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| |||
211 | 221 | | |
212 | 222 | | |
213 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
214 | 230 | | |
215 | 231 | | |
216 | 232 | | |
| |||
0 commit comments