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

Splice hole with singleton captures #18357

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Aug 8, 2023

When we had a reference to a x.type we mistakenly captured x instead of x.type. This was caused because SingletonTypeTree was not handled in Splicing.

Revisit #17109

@nicolasstucki nicolasstucki force-pushed the splice-hole-with-singleton-captures-revisit branch 3 times, most recently from dffadfc to 5a93f6f Compare August 8, 2023 08:45
@nicolasstucki nicolasstucki changed the title Splice hole with singleton captures revisit Splice hole with singleton captures Aug 8, 2023
@nicolasstucki nicolasstucki force-pushed the splice-hole-with-singleton-captures-revisit branch from 5161819 to 1612275 Compare August 8, 2023 12:22
@nicolasstucki nicolasstucki self-assigned this Aug 9, 2023
@nicolasstucki nicolasstucki force-pushed the splice-hole-with-singleton-captures-revisit branch 2 times, most recently from 8ea1b07 to 2731ec5 Compare August 11, 2023 14:00
@nicolasstucki nicolasstucki marked this pull request as ready for review August 12, 2023 04:35
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala Outdated Show resolved Hide resolved
When we had a reference to a `x.type` we mistakenly captured `x` instead
of `x.type`. This was caused because `SingletonTypeTree` was not handled
in `Splicing`. Fixing this uncovered some inconsistencies with the types
in the encoding of the hole captured types and contents.
@nicolasstucki nicolasstucki force-pushed the splice-hole-with-singleton-captures-revisit branch from 8d0b817 to df0c16f Compare August 15, 2023 07:06
@nicolasstucki nicolasstucki merged commit 37a0750 into scala:main Aug 15, 2023
14 checks passed
@nicolasstucki nicolasstucki deleted the splice-hole-with-singleton-captures-revisit branch August 15, 2023 08:32
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
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.

3 participants