Skip to content

Fix #522. #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/dotty/tools/dotc/transform/FullParameterization.scala
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ trait FullParameterization {
info match {
case info @ PolyType(mtnames) =>
PolyType(mtnames ++ ctnames)(
pt => (info.paramBounds ++ mappedClassBounds(pt))
.mapConserve(_.subst(info, pt).bounds),
pt =>
(info.paramBounds.map(mapClassParams(_, pt).bounds) ++
mappedClassBounds(pt)).mapConserve(_.subst(info, pt).bounds),
pt => resultType(mapClassParams(_, pt)).subst(info, pt))
case _ =>
if (ctparams.isEmpty) resultType(identity)
Expand Down
5 changes: 5 additions & 0 deletions tests/pos/extmethods.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ class T[A, This <: That1[A]](val x: Int) extends AnyVal {
final def loop(x: This, cnt: Int): Int = loop(x, cnt + 1)
def const[B](): Boolean = return true
}

class Foo[+A <: AnyRef](val xs: List[A]) extends AnyVal {
def baz[B >: A](x: B): List[B] = ???
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding these tests here, you should move tests/pending/pos/t6482.scala and tests/pending/pos/t7022.scala to tests/pos/.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will do.

File renamed without changes.
File renamed without changes.