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

Applying some type widening in ReturnElimination to avoid triggering AdtSpecialization #1466

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

mario-bucev
Copy link
Collaborator

For instance, the provided tests in RefnChecksWithReturn.scala would unexpectedly generate "refinement checks for subtyping" which may result in being invalid due to #1463.

@@ -495,6 +497,19 @@ class ReturnElimination(override val s: Trees, override val t: Trees)
(res, fnSum)
}

// Recursively widen class types to their top ancestor, and strips sigma, pi and refinement types.
// This used to type the control flow type parameters in order to avoid triggering AdtSpecialization
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is used ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

whoops, thanks for catching that!

@mario-bucev mario-bucev force-pushed the widening-returnelimination branch from 90b9a4a to db6fac3 Compare November 1, 2023 13:03
@mario-bucev mario-bucev force-pushed the widening-returnelimination branch from db6fac3 to d9b3471 Compare November 2, 2023 13:51
@vkuncak vkuncak merged commit d38a2ba into epfl-lara:main Nov 2, 2023
@mario-bucev mario-bucev deleted the widening-returnelimination branch November 2, 2023 14:47
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.

2 participants