File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,16 @@ available for migrating the usage sites are the following:
60
60
61
61
The first, in some ways simplest, migration strategy for all non-varargs usages of ` scala.Seq ` is to replace
62
62
them with ` scala.collection.Seq ` (and require users to call ` .toSeq ` or ` unsafeWrapArray ` when passing such
63
- sequences to varargs methods). We recommend, in order of preference, doing such a replacement with one of:
63
+ sequences to varargs methods).
64
64
65
- - ` import scala.{ collection => sc } ` and using ` sc.Seq `
66
- - ` import scala.collection.{ Seq => CSeq } ` and using ` CSeq `
67
- - replacing ` Seq[...] ` usage with the fully-qualified ` scala.collection.Seq[...] ` (e.g. in code gen or macros)
68
- - ` import scala.collection.Seq ` , which shadows ` scala.Seq ` and is a 1-line change, but causes name confusion
65
+ We recommend using ` import scala.{ collection => sc } ` and using ` sc.Seq ` , or `import scala.collection.{ Seq =>
66
+ CSeq }` and ` CSeq`.
69
67
70
- As an example, it would look something like this:
68
+ We recommend against using ` import scala.collection.Seq ` , which shadows the automatically imported ` scala.Seq ` ,
69
+ because even if it's a oneline change it causes name confusion. For code generation or macros the safest option
70
+ is using the fully-qualified ` _root_.scala.collection.Seq ` .
71
+
72
+ As an example, the migration would look something like this:
71
73
72
74
~~~ scala
73
75
import scala .{ collection => sc }
You can’t perform that action at this time.
0 commit comments