Repository navigation
Commit 368a410
committed
fix(js): bind this calls to the caller's own class
this.save() in one JS/TS class was resolved through the file-wide name
map, which keeps only the last definition of each name, so a class that
calls this.save() was wired to the save() of whichever class the file
declared last, as EXTRACTED. In zod's v3 types.ts every ZodString,
ZodNumber and ZodBigInt check method landed on ZodDate._addCheck.
Route this.m() and super.m() through the self-call lookup the Python
fix added, renamed _self_call_target. It binds to the caller's own
class when that class defines m(). JS/TS extends edges are only emitted
by the later symbol pass, so the base chain is unknown at this point;
anything the own class does not define keeps the plain lookup, which
leaves inherited this.m() edges exactly as they were.1 parent 02e1ed4 commit 368a410
2 files changed
Lines changed: 77 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1356 | 1356 | | |
1357 | 1357 | | |
1358 | 1358 | | |
1359 | | - | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1360 | 1365 | | |
1361 | 1366 | | |
1362 | 1367 | | |
| |||
1365 | 1370 | | |
1366 | 1371 | | |
1367 | 1372 | | |
| 1373 | + | |
1368 | 1374 | | |
1369 | | - | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
1370 | 1381 | | |
1371 | 1382 | | |
1372 | 1383 | | |
| |||
1393 | 1404 | | |
1394 | 1405 | | |
1395 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
1396 | 1409 | | |
1397 | 1410 | | |
1398 | 1411 | | |
| |||
6215 | 6228 | | |
6216 | 6229 | | |
6217 | 6230 | | |
6218 | | - | |
| 6231 | + | |
| 6232 | + | |
6219 | 6233 | | |
6220 | 6234 | | |
6221 | | - | |
| 6235 | + | |
6222 | 6236 | | |
6223 | 6237 | | |
6224 | 6238 | | |
| |||
6507 | 6521 | | |
6508 | 6522 | | |
6509 | 6523 | | |
| 6524 | + | |
| 6525 | + | |
| 6526 | + | |
6510 | 6527 | | |
6511 | 6528 | | |
6512 | 6529 | | |
| |||
6892 | 6909 | | |
6893 | 6910 | | |
6894 | 6911 | | |
| 6912 | + | |
| 6913 | + | |
| 6914 | + | |
| 6915 | + | |
| 6916 | + | |
| 6917 | + | |
6895 | 6918 | | |
6896 | 6919 | | |
6897 | 6920 | | |
| |||
7017 | 7040 | | |
7018 | 7041 | | |
7019 | 7042 | | |
7020 | | - | |
| 7043 | + | |
7021 | 7044 | | |
7022 | | - | |
7023 | 7045 | | |
7024 | | - | |
7025 | | - | |
7026 | | - | |
7027 | | - | |
| 7046 | + | |
| 7047 | + | |
| 7048 | + | |
| 7049 | + | |
| 7050 | + | |
7028 | 7051 | | |
7029 | 7052 | | |
7030 | 7053 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2234 | 2234 | | |
2235 | 2235 | | |
2236 | 2236 | | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
2237 | 2281 | | |
2238 | 2282 | | |
2239 | 2283 | | |
| |||
0 commit comments