File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
compiler/src/dotty/tools/dotc/transform
tests/generic-java-signatures Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -740,7 +740,7 @@ object Erasure {
740740 }
741741
742742 private def hiBounds (bounds : TypeBounds )(implicit ctx : Context ): List [Type ] = bounds.hi.widenDealias match {
743- case AndType (tp1, tp2) => tp1 :: tp2 :: Nil
743+ case AndType (tp1, tp2) => hiBounds( tp1.bounds) ::: hiBounds(tp2.bounds)
744744 case tp => tp :: Nil
745745 }
746746
Original file line number Diff line number Diff line change 1+ T <: C1, T1, T2
Original file line number Diff line number Diff line change 1+ class C1
2+ trait T1
3+ trait T2
4+
5+ class Foo {
6+ def foo [T <: (C1 & T1 ) & T2 ] = ()
7+ }
8+
9+ object Test {
10+ def main (args : Array [String ]): Unit = {
11+ val tParams = classOf [Foo ].getDeclaredMethod(" foo" ).getTypeParameters
12+ tParams.foreach { tp =>
13+ println(tp.getName + " <: " + tp.getBounds.map(_.getTypeName).mkString(" , " ))
14+ }
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments