diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-10-02 13:19:43 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-10-02 13:19:43 -0700 |
commit | 5b9af1b9ff327e8efa2c8b6e8b9ed8d3cdf2598e (patch) | |
tree | f0f44c55e24fa5cdf4408808fcd45cf9a5893a49 /test/files/pos | |
parent | a64359a959497e7cc63a37cdb450a19660bf6a45 (diff) | |
parent | 7f2262b7d44e6d1cc9563b9b3d20c51179533a94 (diff) | |
download | scala-5b9af1b9ff327e8efa2c8b6e8b9ed8d3cdf2598e.tar.gz scala-5b9af1b9ff327e8efa2c8b6e8b9ed8d3cdf2598e.tar.bz2 scala-5b9af1b9ff327e8efa2c8b6e8b9ed8d3cdf2598e.zip |
Merge pull request #1444 from gkossakowski/2.10.x
Merge branch 'scala/2.10.0-wip' into 2.10.x
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t4881.scala | 31 | ||||
-rw-r--r-- | test/files/pos/t6311.scala | 5 |
2 files changed, 5 insertions, 31 deletions
diff --git a/test/files/pos/t4881.scala b/test/files/pos/t4881.scala deleted file mode 100644 index 46cfad9793..0000000000 --- a/test/files/pos/t4881.scala +++ /dev/null @@ -1,31 +0,0 @@ -class Contra[-T] -trait A -trait B extends A -trait C extends B - -// test improved variance inference: first try formals to see in which variance positions the type param appears; -// only when that fails to determine variance, look at result type -object Test { - def contraLBUB[a >: C <: A](): Contra[a] = null - def contraLB[a >: C](): Contra[a] = null - -{ - val x = contraLBUB() //inferred Contra[C] instead of Contra[A] - val x1: Contra[A] = x -} - -{ - val x = contraLB() //inferred Contra[C] instead of Contra[Any] - val x1: Contra[Any] = x -} - -{ - val x = contraLBUB // make sure it does the same thing as its ()-less counterpart - val x1: Contra[A] = x -} - -{ - val x = contraLB - val x1: Contra[Any] = x -} -} diff --git a/test/files/pos/t6311.scala b/test/files/pos/t6311.scala new file mode 100644 index 0000000000..d27ad2f502 --- /dev/null +++ b/test/files/pos/t6311.scala @@ -0,0 +1,5 @@ +class A { + def fooMinimal[T, Coll <: Traversable[T]](msg: String)(param1: Traversable[T])(param2: Coll): Traversable[T] = throw new Exception() + + fooMinimal("")(List(1))(List(2)) +} |