diff options
author | Burak Emir <emir@epfl.ch> | 2007-08-22 05:08:56 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-08-22 05:08:56 +0000 |
commit | d1dcdba7eef5a55087099a1ad04c63f9059ecea5 (patch) | |
tree | 462845aaf37a27e539230eed878af0b05e4a6080 /test/files/run | |
parent | ea8c405c26609aaa7abd9e670ab4bf95afe0a1fa (diff) | |
download | scala-d1dcdba7eef5a55087099a1ad04c63f9059ecea5.tar.gz scala-d1dcdba7eef5a55087099a1ad04c63f9059ecea5.tar.bz2 scala-d1dcdba7eef5a55087099a1ad04c63f9059ecea5.zip |
Ident(sym) => mkIdent(sym), avoids unattributed...
Ident(sym) => mkIdent(sym), avoids unattributed ident blowing up Erasure
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/patmatnew.scala | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index 36e52315a6..76395bd7e2 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -35,7 +35,8 @@ object Test extends TestConsoleMain { new Test903, new Test1093, new Test1163_Order, - new TestUnbox + new TestUnbox, + ClassDefInGuard ) class Foo(j:Int) { @@ -427,15 +428,22 @@ object Test extends TestConsoleMain { println((new Buffer).jp.isDefinedAt(42)) } - object lk { // compile only + object ClassDefInGuard extends TestCase("classdef in guard") { // compile-and-load only val z:PartialFunction[Any,Any] = { case x::xs if xs.forall { y => y.hashCode() > 0 } => 1 } + override def runTest { val s:PartialFunction[Any,Any] = { - case List(x) if List(x).forall { g => g.hashCode() > 0 } => 1 + case List(4::xs) => 1 + case List(5::xs) => 1 + case _ if false => + case List(3::xs) if List(3:Any).forall { g => g.hashCode() > 0 } => 1 + } + z.isDefinedAt(42) + s.isDefinedAt(42) + // just load the thing, to see if the classes are found } - } } |