aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/bounds.scala
blob: 55eec6941b1085aab33a840a4fad5d8d2a38979a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
object Test {
  class C[B >: String <: Int](x: B)
  def g[B >: String <: Int](x: B): Int = x
  def main(args: Array[String]): Unit = {
    g("foo")
    new C("bar")
  }
  def baz[X >: Y, Y <: String](x: X, y: Y) = (x, y)

  baz[Int, String](1, "abc")

}