Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a new prefixDirect in checkKindBounds0
Analogous to `typeSymbolDirect`, we add `prefixDirect`, because `prefix` normalizes type aliases. But kind-checking should not normalize type aliases. This was the intention as noted by comments and `typeSymbolDirect`.
- Loading branch information
Showing
4 changed files
with
49 additions
and
4 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
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,13 @@ | ||
object Test { | ||
trait TypePreservingFn[T[X <: T[X]]] | ||
trait Validator[T, This <: Validator[T,This]] | ||
|
||
trait Foo[T] { | ||
type V[This <: Validator[T, This]] = Validator[T, This] | ||
val f: TypePreservingFn[V] = ??? | ||
} | ||
|
||
class Bar[T] extends Foo[T] { | ||
val g: TypePreservingFn[V] = ??? | ||
} | ||
} |