File tree Expand file tree Collapse file tree 10 files changed +21
-21
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 10 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ Standard-Section: "ASTs" TopLevelStat*
57
57
Stat = Term
58
58
ValOrDefDef
59
59
TYPEDEF Length NameRef (type_Term | Template) Modifier* -- modifiers type name (= type | bounds) | moifiers class name template
60
- IMPORT Length [IMPLIED] qual_Term Selector* -- import implied ? qual selectors
60
+ IMPORT Length [IMPLIED] qual_Term Selector* -- import implicit ? qual selectors
61
61
ValOrDefDef = VALDEF Length NameRef type_Term rhs_Term? Modifier* -- modifiers val name : type (= rhs)?
62
62
DEFDEF Length NameRef TypeParam* Params* returnType_Term rhs_Term?
63
63
Modifier* -- modifiers def name [typeparams] paramss : returnType (= rhs)?
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ object Completion {
121
121
if (buffer.mode != Mode .None ) {
122
122
path match {
123
123
case Select (qual, _) :: _ => buffer.addMemberCompletions(qual)
124
- case Import (_, expr, _) :: _ => buffer.addMemberCompletions(expr) // TODO: distinguish implied from non-implied
124
+ case Import (_, expr, _) :: _ => buffer.addMemberCompletions(expr) // TODO: distinguish implicit from non-implicit
125
125
case (_ : Thicket ) :: Import (_, expr, _) :: _ => buffer.addMemberCompletions(expr)
126
126
case _ => buffer.addScopeCompletions
127
127
}
Original file line number Diff line number Diff line change @@ -504,7 +504,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
504
504
case id :: Nil => toText(id)
505
505
case _ => " {" ~ Text (selectors map selectorText, " , " ) ~ " }"
506
506
}
507
- keywordText(" import " ) ~ (keywordText(" implied " ) provided importImplied) ~
507
+ keywordText(" import " ) ~ (keywordText(" implicit " ) provided importImplied) ~
508
508
toTextLocal(expr) ~ " ." ~ selectorsText
509
509
case packageDef : PackageDef =>
510
510
packageDefText(packageDef)
Original file line number Diff line number Diff line change @@ -1350,22 +1350,22 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
1350
1350
(flip(tp1) relaxed_<:< flip(tp2)) || viewExists(tp1, tp2)
1351
1351
}
1352
1352
1353
- /** Widen the result type of synthetic implied methods from the implementation class to the
1353
+ /** Widen the result type of synthetic implicit methods from the implementation class to the
1354
1354
* type that's implemented. Example
1355
1355
*
1356
- * implied I[X] for T { ... }
1356
+ * implicit I[X] for T { ... }
1357
1357
*
1358
1358
* This desugars to
1359
1359
*
1360
1360
* class I[X] extends T { ... }
1361
- * implied def I[X]: I[X] = new I[X]
1361
+ * implicit def I[X]: I[X] = new I[X]
1362
1362
*
1363
1363
* To compare specificity we should compare with `T`, not with its implementation `I[X]`.
1364
- * No such widening is performed for implied aliases, which are not synthetic. E.g.
1364
+ * No such widening is performed for implicit aliases, which are not synthetic. E.g.
1365
1365
*
1366
- * implied J[X] for T = rhs
1366
+ * implicit J[X] for T = rhs
1367
1367
*
1368
- * already has the right result type `T`. Neither is widening performed for implied
1368
+ * already has the right result type `T`. Neither is widening performed for implicit
1369
1369
* objects, since these are anyway taken to be more specific than methods
1370
1370
* (by condition 3a above).
1371
1371
*/
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ trait Deriving { this: Typer =>
247
247
}
248
248
249
249
/** If any of the instances has a companion with a `derived` member
250
- * that refers to `scala.reflect.Generic`, add an implied instance
250
+ * that refers to `scala.reflect.Generic`, add an implicit instance
251
251
* of `Generic`. Note: this is just an optimization to avoid possible
252
252
* code duplication. Generic instances are created on the fly if they
253
253
* are missing from the companion.
Original file line number Diff line number Diff line change @@ -918,7 +918,7 @@ trait Implicits { self: Typer =>
918
918
case fail : SearchFailureType =>
919
919
920
920
def hiddenImplicitNote (s : SearchSuccess ) =
921
- em " \n\n Note: implied instance ${s.ref.symbol.showLocated} was not considered because it was not imported with an `import implied `. "
921
+ em " \n\n Note: implicit instance ${s.ref.symbol.showLocated} was not considered because it was not imported with an `import implicit `. "
922
922
923
923
def FindHiddenImplicitsCtx (ctx : Context ): Context =
924
924
if (ctx == NoContext ) ctx
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ object ImportInfo {
26
26
* @param selectors The selector clauses
27
27
* @param symNameOpt Optionally, the name of the import symbol. None for root imports.
28
28
* Defined for all explicit imports from ident or select nodes.
29
- * @param importImplied true if this is an implied import
29
+ * @param importImplied true if this is an implicit import
30
30
* @param isRootImport true if this is one of the implicit imports of scala, java.lang,
31
31
* scala.Predef or dotty.DottyPredef in the start context, false otherwise.
32
32
*/
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ sealed trait Eql[-L, -R]
12
12
* the compiler (see Implicits.synthesizedEq), so they are not included here.
13
13
*/
14
14
object Eql {
15
- /** A non-implied universal `Eql` instance. */
15
+ /** A non-implicit universal `Eql` instance. */
16
16
object derived extends Eql [Any , Any ]
17
17
18
18
/** A fall-back instance to compare values of any types.
19
- * Even though this method is not declared implied , the compiler will
20
- * compute implied instances as solutions to `Eql[T, U]` queries if
19
+ * Even though this method is not declared implicit , the compiler will
20
+ * compute implicit instances as solutions to `Eql[T, U]` queries if
21
21
* the rules of multiversal equality require it.
22
22
*/
23
23
def eqlAny [L , R ]: Eql [L , R ] = derived
Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ trait Printers
554
554
555
555
case Import (importImplied, expr, selectors) =>
556
556
this += " import "
557
- if (importImplied) this += " implied "
557
+ if (importImplied) this += " implied " // FIXME: change to "implicit "
558
558
printTree(expr)
559
559
this += " ."
560
560
printImportSelectors(selectors)
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ object language {
107
107
* }}}
108
108
*
109
109
* Implicit values of other types are not affected, and neither are implicit
110
- * classes. In particular, implied instances of the scala.Conversion class can be
110
+ * classes. In particular, implicit instances of the scala.Conversion class can be
111
111
* defined without having to import the language feature.
112
112
*
113
113
* The language import is also required to enable _uses_ of implicit conversions
@@ -119,13 +119,13 @@ object language {
119
119
* class A
120
120
* class B
121
121
* object B {
122
- * implied a2b for Conversion[A, B] { ... }
122
+ * implicit a2b for Conversion[A, B] { ... }
123
123
* }
124
124
* object C {
125
- * implied b2a for Conversion[B, A] { ... }
125
+ * implicit b2a for Conversion[B, A] { ... }
126
126
* }
127
- * import implied B._
128
- * import implied C._
127
+ * import implicit B._
128
+ * import implicit C._
129
129
* val x: A = new B // language import required
130
130
* val x: B = new A // no import necessary since a2b is co-defined with B
131
131
* }}}
You can’t perform that action at this time.
0 commit comments