diff options
author | Som Snytt <som.snytt@gmail.com> | 2016-05-25 11:55:47 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2016-05-25 12:06:32 -0700 |
commit | 54dff8120786501f0e273166869b73b5f3accd17 (patch) | |
tree | c9464d96ab684c11ddfa43dd3adc86455abccc1f /src | |
parent | 808f3d071e97aa23b797f2c0616c207ff1f20229 (diff) | |
download | scala-54dff8120786501f0e273166869b73b5f3accd17.tar.gz scala-54dff8120786501f0e273166869b73b5f3accd17.tar.bz2 scala-54dff8120786501f0e273166869b73b5f3accd17.zip |
SI-9382 Privatize enhanced x in Tuple2Zipped.Ops
Probably there should be an Abide rule to avoid leaking
the "underlying value" of a value class. The spec or SIP defines
"underlying type" but doesn't mention the underlying value.
The argument for concealing the member is that it is redundant
and makes autocompletion results harder to read. Also, possibly
an additional implicit might want to add a member so-named.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/runtime/Tuple2Zipped.scala | 2 | ||||
-rw-r--r-- | src/library/scala/runtime/Tuple3Zipped.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/runtime/Tuple2Zipped.scala b/src/library/scala/runtime/Tuple2Zipped.scala index 15331d4160..41ed9644aa 100644 --- a/src/library/scala/runtime/Tuple2Zipped.scala +++ b/src/library/scala/runtime/Tuple2Zipped.scala @@ -115,7 +115,7 @@ final class Tuple2Zipped[El1, Repr1, El2, Repr2](val colls: (TraversableLike[El1 } object Tuple2Zipped { - final class Ops[T1, T2](val x: (T1, T2)) extends AnyVal { + final class Ops[T1, T2](private val x: (T1, T2)) extends AnyVal { def invert[El1, CC1[X] <: TraversableOnce[X], El2, CC2[X] <: TraversableOnce[X], That] (implicit w1: T1 <:< CC1[El1], w2: T2 <:< CC2[El2], diff --git a/src/library/scala/runtime/Tuple3Zipped.scala b/src/library/scala/runtime/Tuple3Zipped.scala index 62bee5ff0e..89f401ea80 100644 --- a/src/library/scala/runtime/Tuple3Zipped.scala +++ b/src/library/scala/runtime/Tuple3Zipped.scala @@ -123,7 +123,7 @@ final class Tuple3Zipped[El1, Repr1, El2, Repr2, El3, Repr3](val colls: (Travers } object Tuple3Zipped { - final class Ops[T1, T2, T3](val x: (T1, T2, T3)) extends AnyVal { + final class Ops[T1, T2, T3](private val x: (T1, T2, T3)) extends AnyVal { def invert[El1, CC1[X] <: TraversableOnce[X], El2, CC2[X] <: TraversableOnce[X], El3, CC3[X] <: TraversableOnce[X], That] (implicit w1: T1 <:< CC1[El1], w2: T2 <:< CC2[El2], |