Commit 305b705
committed
Also include companions of prefixes in implicit scope
In that way, we include all of the implicit scope of Scala 2, except
for package objects. The idea is that everything that is reasonable
should be included in the implicit scope.
Package objects were excluded since they had a dual purpose:
1. as a way to define implicits that are in scope for a whole project
2. as a prefix for implicits of all types coming out of that project
It's often that one wants only (1) but then is surprised to also get (2).
# Conflicts:
# compiler/src/dotty/tools/dotc/typer/Implicits.scala
# tests/pos/i9103.scala1 parent 3c6f20d commit 305b705
File tree
2 files changed
+30
-9
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
2 files changed
+30
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | 503 | | |
511 | 504 | | |
512 | 505 | | |
| |||
516 | 509 | | |
517 | 510 | | |
518 | 511 | | |
519 | | - | |
| 512 | + | |
520 | 513 | | |
521 | 514 | | |
522 | 515 | | |
523 | 516 | | |
524 | 517 | | |
525 | | - | |
| 518 | + | |
526 | 519 | | |
527 | 520 | | |
528 | 521 | | |
| |||
| 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 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments