Commit 7114ed2
authored
Preserve runtime error node IDs from Resolve (#1290)
When absoluteAttribute.Resolve() encounters a *types.Err variable value,
return it directly rather than calling Unwrap(). The Unwrap call strips
the Err wrapper and its node ID, causing callers to re-label the error
with the observation site's ID instead of the originating expression's ID.
Additionally, make WrapErr pass through existing *types.Err values rather
than double-wrapping them. This ensures that LabelErrNode sees the
original non-zero node ID and preserves it, regardless of the call site.
Fixes #11911 parent d91350b commit 7114ed2
3 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1109 | 1124 | | |
1110 | 1125 | | |
1111 | 1126 | | |
| |||
1170 | 1185 | | |
1171 | 1186 | | |
1172 | 1187 | | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
1173 | 1192 | | |
1174 | 1193 | | |
1175 | 1194 | | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1176 | 1201 | | |
1177 | 1202 | | |
1178 | 1203 | | |
| |||
0 commit comments