added regression tests for bugs 1106 and 1136

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@11846 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
moors 2007-05-30 07:10:09 +00:00
parent 62f820073d
commit b429c54194
4 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,7 @@
bug1106.scala:2: error: expected class or object definition
val p = new Par[String]
^
bug1106.scala:5: error: expected class or object definition
new Foo[p.type](p) // crashes compiler
^
two errors found

View File

@ -0,0 +1,5 @@
class Par[S]
val p = new Par[String]
class Foo[T[x]<:Par[x]](t: T[String])
new Foo[p.type](p) // crashes compiler

View File

@ -0,0 +1,2 @@
warning: there were unchecked warnings; re-run with -unchecked for details
one warning found

View File

@ -0,0 +1,8 @@
object test {
def foo(s: Int*): Unit = {
s.toList match {
case t: List[Int] => foo(t: _*)
case _ =>
}
}
}