summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-10-26 10:17:21 +0000
committerMartin Odersky <odersky@gmail.com>2006-10-26 10:17:21 +0000
commit2fd723d1cdcfb7435f2fa947acff6eaf308ba778 (patch)
treeb27c66dcdb53b79ea89a19d6335caca9759bd515 /test
parent44b54567069d4fad11e15a4ab466ad2ad6e4fb65 (diff)
downloadscala-2fd723d1cdcfb7435f2fa947acff6eaf308ba778.tar.gz
scala-2fd723d1cdcfb7435f2fa947acff6eaf308ba778.tar.bz2
scala-2fd723d1cdcfb7435f2fa947acff6eaf308ba778.zip
fxied bug788
changed collection library to use type patterns
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/bug788.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/bug788.scala b/test/files/pos/bug788.scala
new file mode 100644
index 0000000000..23ffa4a52d
--- /dev/null
+++ b/test/files/pos/bug788.scala
@@ -0,0 +1,20 @@
+package test;
+
+trait Test {
+ type Node <: NodeImpl;
+ trait NodeImpl;
+ type Expression <: Node with ExpressionImpl;
+ trait ExpressionImpl extends NodeImpl {
+ def self : Expression;
+ }
+ type Named <: Node with NamedImpl;
+ trait NamedImpl extends NodeImpl {
+ def self : Named;
+ }
+ def asExpression(e : ExpressionImpl) : Named = {
+ e match {
+ case f : NamedImpl => f.self;
+ case _ => null;
+ }
+ }
+}