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:
parent
62f820073d
commit
b429c54194
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,2 @@
|
|||
warning: there were unchecked warnings; re-run with -unchecked for details
|
||||
one warning found
|
|
@ -0,0 +1,8 @@
|
|||
object test {
|
||||
def foo(s: Int*): Unit = {
|
||||
s.toList match {
|
||||
case t: List[Int] => foo(t: _*)
|
||||
case _ =>
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue