File tree 1 file changed +4
-4
lines changed
docs/docs/reference/contextual
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ object B:
27
27
...
28
28
```
29
29
30
- Generally, a normal wildcard selector ` _ ` brings all definitions other than givens or extensions into scope
30
+ Generally, a normal wildcard selector ` * ` brings all definitions other than givens or extensions into scope
31
31
whereas a ` given ` selector brings all givens (including those resulting from extensions) into scope.
32
32
33
33
There are two main benefits arising from these rules:
@@ -90,11 +90,11 @@ normal imports to givens and given imports.
90
90
The following modifications avoid this hurdle to migration.
91
91
92
92
1 . A ` given ` import selector also brings old style implicits into scope. So, in Scala 3.0
93
- an old-style implicit definition can be brought into scope either by a ` _ ` or a ` given ` wildcard selector.
93
+ an old-style implicit definition can be brought into scope either by a ` * ` or a ` given ` wildcard selector.
94
94
95
- 2 . In Scala 3.1, old-style implicits accessed through a ` _ ` wildcard import will give a deprecation warning.
95
+ 2 . In Scala 3.1, old-style implicits accessed through a ` * ` wildcard import will give a deprecation warning.
96
96
97
- 3 . In some version after 3.1, old-style implicits accessed through a ` _ ` wildcard import will give a compiler error.
97
+ 3 . In some version after 3.1, old-style implicits accessed through a ` * ` wildcard import will give a compiler error.
98
98
99
99
These rules mean that library users can use ` given ` selectors to access old-style implicits in Scala 3.0,
100
100
and will be gently nudged and then forced to do so in later versions. Libraries can then switch to
You can’t perform that action at this time.
0 commit comments