Skip to content

Generalize TypeBoundsTree to bounded opaque aliases #8212

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 3 commits into from
Feb 6, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 5, 2020

The RHS of an opaque type can consist of three parts:

  >: loBound <: hiBound = alias

This is encoded so far in a WithBounds annotation, but that mechanism means
hidden complexity for the Tasty standard. We now encode the alias directly,
as an optional third argument to a TypeBoundsTree structure.

Note: This needs an update of Tasty reader and Tasty reflection.

The RHS of an opaque type can consist of three parts:
```
  >: loBound <: hiBound = alias
```
This is encoded sp far in WithBounds annotation, but that mechanism means
hidden complexity for the Tasty standard. We now encode the alias directly,
as an optional third argument to a TypeBoundsTree structure.
Use new three-element TypeBoundsTree to represent bounded opaque aliases instead.
@odersky
Copy link
Contributor Author

odersky commented Feb 6, 2020

@nicolasstucki Can you do the Tasty reflect side of this? As a separate PR is fine.

@bishabosha bishabosha mentioned this pull request Feb 6, 2020
12 tasks
@bishabosha
Copy link
Member

This looks like a good change

@odersky odersky merged commit a331da7 into scala:master Feb 6, 2020
@odersky odersky deleted the drop-withbounds branch February 6, 2020 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants