summaryrefslogtreecommitdiff
path: root/test/files/run/patmat-bind-typed.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-08-17 07:44:50 -0700
committerPaul Phillips <paulp@improving.org>2013-08-17 10:58:11 -0700
commit0cf47bdb5b1b57589883544933af56a4af848492 (patch)
treeaa58f51ba86bdde7241ed42bd317bf4638cc000e /test/files/run/patmat-bind-typed.scala
parentd351a1f79b5bd5f3be7d5e292f046495a9a0e629 (diff)
downloadscala-0cf47bdb5b1b57589883544933af56a4af848492.tar.gz
scala-0cf47bdb5b1b57589883544933af56a4af848492.tar.bz2
scala-0cf47bdb5b1b57589883544933af56a4af848492.zip
Simplified the MaybeBoundTyped extractor a bit.
Diffstat (limited to 'test/files/run/patmat-bind-typed.scala')
-rw-r--r--test/files/run/patmat-bind-typed.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/patmat-bind-typed.scala b/test/files/run/patmat-bind-typed.scala
new file mode 100644
index 0000000000..10de921c51
--- /dev/null
+++ b/test/files/run/patmat-bind-typed.scala
@@ -0,0 +1,8 @@
+object Test {
+ def f(xs: List[Any]) = for (key @ (dummy: String) <- xs) yield key
+
+ def main(args: Array[String]): Unit = {
+ f("abc" :: Nil) foreach println
+ f(5 :: Nil) foreach println
+ }
+}