diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/patmat-bind-typed.check | 1 | ||||
-rw-r--r-- | test/files/run/patmat-bind-typed.scala | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/patmat-bind-typed.check b/test/files/run/patmat-bind-typed.check new file mode 100644 index 0000000000..8baef1b4ab --- /dev/null +++ b/test/files/run/patmat-bind-typed.check @@ -0,0 +1 @@ +abc 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 + } +} |