Skip to content
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

Fix #21869 and #21870: handle CapsOf in more places #21875

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

noti0na1
Copy link
Member

@noti0na1 noti0na1 commented Nov 1, 2024

Fix #21869 and #21870

@@ -198,7 +198,7 @@ extension (tp: Type)
|| tp.isRootCapability
) && !tp.symbol.isOneOf(UnstableValueFlags)
case tp: TypeRef =>
tp.symbol.isAbstractOrParamType && tp.derivesFrom(defn.Caps_CapSet)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odersky Do you remember why we require the arguments of CapsOf to be abstract before? I think any type derived from CapSet should work.

@noti0na1 noti0na1 changed the title Fix #21869: Handle CapsOf in more places Fix #21869 and #21870: handle CapsOf in more places Nov 1, 2024
@noti0na1 noti0na1 self-assigned this Nov 4, 2024
@noti0na1 noti0na1 marked this pull request as ready for review November 19, 2024 17:05
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.

Using abstract types to encode explicit capture polymorphism fails
2 participants