Commit fa08d00
Allow override protected[C] in companion (#14105)
* Allow override protected[C] in companion
When extending C in its companion, allow
override protected[C] where C denotes the
enclosing companion module of C.
Lookup of local companion is broken under
`-from-tasty`, so this accommodation is
disallowed for local companions.
* RefChecks: add reference to related issue in comment
Co-authored-by: Guillaume Martres <smarter@ubuntu.com>
Co-authored-by: Guillaume Raffin <theelectronwill@gmail.com>
Co-authored-by: Guillaume Martres <smarter@ubuntu.com>1 parent 29fc554 commit fa08d00
File tree
3 files changed
+40
-10
lines changed- compiler/src/dotty/tools/dotc/typer
- tests
- neg
- pos
3 files changed
+40
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
414 | | - | |
415 | 413 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
423 | 425 | | |
424 | 426 | | |
425 | | - | |
| 427 | + | |
426 | 428 | | |
427 | 429 | | |
428 | 430 | | |
| |||
503 | 505 | | |
504 | 506 | | |
505 | 507 | | |
| 508 | + | |
506 | 509 | | |
507 | 510 | | |
508 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments