From 9be10bc084e8da77a773d6736c6a232ecd40b0c0 Mon Sep 17 00:00:00 2001 From: Rex Kerr Date: Thu, 13 Feb 2014 16:28:36 -0800 Subject: SI-8072 rationalize public implicits in scala parallel collections Pretty much everything seems like it's intended for internal use, so I moved it to a package-private object. Split toParArray out and put it in an implicit class. Added ability to .toParArray from Array and String also. Added test to verify implicits are gone. --- test/files/neg/t8072.check | 4 ++++ test/files/neg/t8072.scala | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 test/files/neg/t8072.check create mode 100644 test/files/neg/t8072.scala (limited to 'test/files') diff --git a/test/files/neg/t8072.check b/test/files/neg/t8072.check new file mode 100644 index 0000000000..9267010135 --- /dev/null +++ b/test/files/neg/t8072.check @@ -0,0 +1,4 @@ +t8072.scala:4: error: value ifParSeq is not a member of List[Int] + val y = x.ifParSeq[Int](throw new Exception).otherwise(0) // Shouldn't compile + ^ +one error found diff --git a/test/files/neg/t8072.scala b/test/files/neg/t8072.scala new file mode 100644 index 0000000000..2c8213e34a --- /dev/null +++ b/test/files/neg/t8072.scala @@ -0,0 +1,6 @@ +class NoIfParSeq { + import collection.parallel._ + val x = List(1,2) + val y = x.ifParSeq[Int](throw new Exception).otherwise(0) // Shouldn't compile + val z = x.toParArray +} \ No newline at end of file -- cgit v1.2.3