File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
docs/docs/reference/changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ This conversion can be either:
21211 . An ` implicit def ` of type ` T => S ` or ` (=> T) => S `
22221 . An implicit value of type ` ImplicitConverter[T, S] `
2323
24+ Defining an implicit conversion will emit a warning unless the import
25+ ` scala.language.implicitConversions ` is in scope, or the flag
26+ ` -language:implicitConversions ` is given to the compiler.
27+
2428## Examples
2529
2630The first example is taken from ` scala.Predef ` . Thanks to this
@@ -38,6 +42,7 @@ The second example shows how to use `ImplicitConverter` to define an
3842types:
3943
4044``` scala
45+ import scala .language .implicitConversions
4146implicit def ordT [T , S ](
4247 implicit conv : ImplicitConverter [T , S ],
4348 ordS : Ordering [S ]
You can’t perform that action at this time.
0 commit comments