git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@12772 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
2b83e0be42
commit
d527b4e099
|
@ -0,0 +1 @@
|
|||
6
|
|
@ -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)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue