-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously we had for any type `T` in ``` object m { type T } ``` that `m.this.T =:= m.T` as long as we are inside object `m` (outside, `m.this.T` makes no sense). Now, assume `T` is an opaque type. ``` object m { opaque type T = Int } ``` Inside `m` we have `this.m.T =:= Int`. Is it also true inside `m` that `m.T =:= Int`? Previously, we said no, which means that subtyping and =:= equality were not transitive in this case. We now say yes. We achieve this by lifting the external reference `m` to `m.this` if we are inside object `m`. An example that shows the difference is pos//opaque-groups-params.scala compiled from Tasty.
- Loading branch information
Showing
3 changed files
with
71 additions
and
45 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