Commit 45d7b2c
Recognize a class inheriting a generic one as a child of its parent
A parent given with arguments (`---@Class A : B<string>`) is parsed into `doc.type.sign`,
which keeps the name one level down. The inheritance walk only looked at plain names, so
such a parent was skipped entirely: `A` was not recognized as a child of whatever `B`
itself inherits, and passing it where the base type is expected reported a mismatch.
The name is now taken from the sign node as well.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent a9aa09a commit 45d7b2c
2 files changed
Lines changed: 34 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | | - | |
594 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
595 | 607 | | |
596 | 608 | | |
597 | 609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
397 | 416 | | |
0 commit comments