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:
21
21
1 . An ` implicit def ` of type ` T => S ` or ` (=> T) => S `
22
22
1 . An implicit value of type ` ImplicitConverter[T, S] `
23
23
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
+
24
28
## Examples
25
29
26
30
The 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
38
42
types:
39
43
40
44
``` scala
45
+ import scala .language .implicitConversions
41
46
implicit def ordT [T , S ](
42
47
implicit conv : ImplicitConverter [T , S ],
43
48
ordS : Ordering [S ]
You can’t perform that action at this time.
0 commit comments