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 @@ -739,7 +739,7 @@ object Erasure {
739739 }
740740
741741 private def hiBounds (bounds : TypeBounds )(implicit ctx : Context ): List [Type ] = bounds.hi.widenDealias match {
742- case AndType (tp1, tp2) => tp1 :: tp2 :: Nil
742+ case AndType (tp1, tp2) => hiBounds( tp1.bounds) ::: hiBounds(tp2.bounds)
743743 case tp => tp :: Nil
744744 }
745745
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