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 /test/files/neg | |
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 'test/files/neg')
-rw-r--r-- | test/files/neg/t9382.check | 10 | ||||
-rw-r--r-- | test/files/neg/t9382.scala | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/t9382.check b/test/files/neg/t9382.check new file mode 100644 index 0000000000..93bf48926a --- /dev/null +++ b/test/files/neg/t9382.check @@ -0,0 +1,10 @@ +t9382.scala:3: error: value x is not a member of (List[Int], List[Int]) + def f = (List(1,2,3), List(4,5,6)).x + ^ +t9382.scala:4: error: value x is not a member of (List[Int], List[Int], List[Int]) + def g = (List(1,2,3), List(4,5,6), List(7,8,9)).x + ^ +t9382.scala:5: error: value x is not a member of (Int, Int) + def huh = (1,2).x + ^ +three errors found diff --git a/test/files/neg/t9382.scala b/test/files/neg/t9382.scala new file mode 100644 index 0000000000..19703525e4 --- /dev/null +++ b/test/files/neg/t9382.scala @@ -0,0 +1,6 @@ + +trait T { + def f = (List(1,2,3), List(4,5,6)).x + def g = (List(1,2,3), List(4,5,6), List(7,8,9)).x + def huh = (1,2).x +} |