forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the tparam bounds of exported inherited classes
When trying to export M2.F, seeing M1#F from the prefix M2 doesn't change the bounds of F's T type parameter, which still refers to M1.this.A, rather than M2.A. So, we run asSeenFrom against that info, when eta-expanding the class into a hk type lambda.
- Loading branch information
Showing
2 changed files
with
27 additions
and
2 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,11 @@ | ||
trait M1: | ||
trait A | ||
trait F[T <: A] | ||
type G[T <: A] = F[T] | ||
|
||
object M2 extends M1 | ||
|
||
trait Test: | ||
export M2.* | ||
def y: F[A] | ||
def z: G[A] |