summaryrefslogtreecommitdiff
path: root/test/files/run/patmatnew.scala
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2006-12-03 00:32:39 +0000
committerBurak Emir <emir@epfl.ch>2006-12-03 00:32:39 +0000
commitccb5bd1da84a8ae09bee61e16f08ca9d726b3270 (patch)
tree5cf4586be40870b0ca9389c0b15317bf970e9737 /test/files/run/patmatnew.scala
parent6cffd12cb90c8353ccd8581a712bffb52a7b4c59 (diff)
downloadscala-ccb5bd1da84a8ae09bee61e16f08ca9d726b3270.tar.gz
scala-ccb5bd1da84a8ae09bee61e16f08ca9d726b3270.tar.bz2
scala-ccb5bd1da84a8ae09bee61e16f08ca9d726b3270.zip
more on Xkilloption, and a PM fix
Diffstat (limited to 'test/files/run/patmatnew.scala')
-rw-r--r--test/files/run/patmatnew.scala26
1 files changed, 24 insertions, 2 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala
index d7cb9aec6f..377e89a267 100644
--- a/test/files/run/patmatnew.scala
+++ b/test/files/run/patmatnew.scala
@@ -20,7 +20,7 @@ object Test {
val tr = new TestResult
new TestSuite(
- new Test01
+ new Test717
).run(tr)
@@ -31,7 +31,7 @@ object Test {
class Foo(j:Int) {
case class Bar(i:Int)
}
- class Test01 extends TestCase("bir (#717 test path of case classes)") {
+ class Test717 extends TestCase("#717 test path of case classes") {
val foo1 = new Foo(1)
val foo2 = new Foo(2)
@@ -43,4 +43,26 @@ object Test {
assertTrue("ok", res);
}
}
+
+ class Test806_818 { // #806, #811 compile only -- type of bind
+ // bug811
+ trait Core {
+ trait NodeImpl;
+ trait OtherImpl extends NodeImpl;
+ trait DoubleQuoteImpl extends NodeImpl;
+ def asDQ(node : OtherImpl) = node match {
+ case dq : DoubleQuoteImpl => dq;
+ }
+ }
+
+ trait IfElseMatcher {
+ type Node <: NodeImpl;
+ trait NodeImpl;
+ trait IfImpl;
+ private def coerceIf(node : Node) = node match {
+ case node : IfImpl => node; // var node is of type Node with IfImpl!
+ case _ => null;
+ }
+ }
+ }
}