diff options
author | Paul Phillips <paulp@improving.org> | 2013-08-17 07:44:50 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-08-17 10:58:11 -0700 |
commit | 0cf47bdb5b1b57589883544933af56a4af848492 (patch) | |
tree | aa58f51ba86bdde7241ed42bd317bf4638cc000e /test/files | |
parent | d351a1f79b5bd5f3be7d5e292f046495a9a0e629 (diff) | |
download | scala-0cf47bdb5b1b57589883544933af56a4af848492.tar.gz scala-0cf47bdb5b1b57589883544933af56a4af848492.tar.bz2 scala-0cf47bdb5b1b57589883544933af56a4af848492.zip |
Simplified the MaybeBoundTyped extractor a bit.
Diffstat (limited to 'test/files')
-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 + } +} |