Skip to content

Commit 2a85b43

Browse files
committed
Merge pull request #526 from dotty-staging/fix/#522
Fix #522.
2 parents 8718d46 + 090a6a6 commit 2a85b43

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

src/dotty/tools/dotc/transform/FullParameterization.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ trait FullParameterization {
116116
info match {
117117
case info @ PolyType(mtnames) =>
118118
PolyType(mtnames ++ ctnames)(
119-
pt => (info.paramBounds ++ mappedClassBounds(pt))
120-
.mapConserve(_.subst(info, pt).bounds),
119+
pt =>
120+
(info.paramBounds.map(mapClassParams(_, pt).bounds) ++
121+
mappedClassBounds(pt)).mapConserve(_.subst(info, pt).bounds),
121122
pt => resultType(mapClassParams(_, pt)).subst(info, pt))
122123
case _ =>
123124
if (ctparams.isEmpty) resultType(identity)

tests/pos/extmethods.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ class T[A, This <: That1[A]](val x: Int) extends AnyVal {
55
final def loop(x: This, cnt: Int): Int = loop(x, cnt + 1)
66
def const[B](): Boolean = return true
77
}
8+
9+
class Foo[+A <: AnyRef](val xs: List[A]) extends AnyVal {
10+
def baz[B >: A](x: B): List[B] = ???
11+
}
12+
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)