Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing asSeenFrom in checkKindBoundsHK
Without it the bounds of higher-kinded type parameters lose their paths.
- Loading branch information
Showing
2 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
object Test { | ||
trait Bounds { | ||
type Upper <: Bounds | ||
} | ||
|
||
trait Narrow extends Bounds { | ||
type Upper >: Narrow <: Bounds | ||
} | ||
|
||
trait Template[+X <: Bounds] extends Bounds { | ||
val body :X | ||
type Bound >: body.Upper <: Bounds | ||
type Copy[+A <: Bound] <: Template[A] | ||
type High[T[+A <: Narrow] <: Bounds] | ||
|
||
def applied(narrow: Template[Narrow]): High[narrow.Copy] //ok | ||
def indirect(narrow: Template[Narrow]): High[({ type T[+A <: Narrow] = narrow.Copy[A] })#T] //also ok | ||
} | ||
} |