diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-10-05 14:17:29 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-10-05 14:17:29 +0200 |
commit | 4cbf89fa4408942ca38815e946f1e02ab913c3ad (patch) | |
tree | b1fc98841d6c26171221e66a5d659b39d856bf65 /test/files/run/t9029.scala | |
parent | c3906917675b54e9ac1f248c9fb0fba9fa310f0e (diff) | |
parent | e6917ac758e782fa03b6912a3feb8f9f8d0950a9 (diff) | |
download | scala-4cbf89fa4408942ca38815e946f1e02ab913c3ad.tar.gz scala-4cbf89fa4408942ca38815e946f1e02ab913c3ad.tar.bz2 scala-4cbf89fa4408942ca38815e946f1e02ab913c3ad.zip |
Merge pull request #4784 from lrytz/merge-2.11-to-2.12-oct-5v2.12.0-M3
Merge 2.11 to 2.12 oct 5
Diffstat (limited to 'test/files/run/t9029.scala')
-rw-r--r-- | test/files/run/t9029.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/t9029.scala b/test/files/run/t9029.scala new file mode 100644 index 0000000000..c01033b76e --- /dev/null +++ b/test/files/run/t9029.scala @@ -0,0 +1,15 @@ +class Y(val _2: Int, val _1: String) + +object X { def unapply(u: Unit): Option[Y] = Some(new Y(42, "!")) } + +object Test { + def test1 = { + val X(y) = () + val yy: Y = y + assert(yy._1 == "!") + assert(yy._2 == 42) + } + def main(args: Array[String]): Unit = { + test1 + } +} |