summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan@lightbend.com>2016-07-26 11:34:47 -0700
committerGitHub <noreply@github.com>2016-07-26 11:34:47 -0700
commitefb74b73aa7ec157eb83c6cbf1fe341842357b2e (patch)
tree992dc1cb9f2f37fce1febcee8f58643389afa87f /test
parent4f749ceedb8b9a0a4417e2d2259c9a20853ad772 (diff)
parenta2cba53e18864a5b9092f1e329c6e0afb09566c5 (diff)
downloadscala-efb74b73aa7ec157eb83c6cbf1fe341842357b2e.tar.gz
scala-efb74b73aa7ec157eb83c6cbf1fe341842357b2e.tar.bz2
scala-efb74b73aa7ec157eb83c6cbf1fe341842357b2e.zip
Merge pull request #5301 from retronym/ticket/SD-167
SD-167 Fine tuning constructor pattern translation Fixes scala/scala-dev#167
Diffstat (limited to 'test')
-rw-r--r--test/files/run/sd167.check1
-rw-r--r--test/files/run/sd167.scala8
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/sd167.check b/test/files/run/sd167.check
new file mode 100644
index 0000000000..587be6b4c3
--- /dev/null
+++ b/test/files/run/sd167.check
@@ -0,0 +1 @@
+x
diff --git a/test/files/run/sd167.scala b/test/files/run/sd167.scala
new file mode 100644
index 0000000000..5095e772ad
--- /dev/null
+++ b/test/files/run/sd167.scala
@@ -0,0 +1,8 @@
+object Test {
+ implicit class ToExtractor(val s: StringContext) {
+ def x = {println("x"); Some }
+ }
+ def main(args: Array[String]) {
+ Some(1) match { case x"${a}" => } // used to convert to `case Some(a) =>` and omit side effects
+ }
+}