git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@12772 5e8d7ff9-d8ef-0310-90f0-a4852d11357a

This commit is contained in:
spoon 2007-09-03 14:49:11 +00:00
parent 2b83e0be42
commit d527b4e099
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1 @@
6

View File

@ -0,0 +1,13 @@
object A1 {
object A2 {
class X { def unapply(v : Int) = Some(v + 1) }
}
}
object C {
def main(args: Array[String]) {
val q = new A1.A2.X
val res = 5 match { case q(x) => x }
println(res)
}
}