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

Handle local lazy vals properly #18998

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

liufengyun
Copy link
Contributor

Lazy vals should be evaluated lazily. In the abstract semantics, we over-approximate lazy vals by treating them as parameter-less methods. The abstract cache will guard against non-terminating recursion and avoids unnecessary re-evaluation.

The checker for class instances already handles local lazy vals properly.

Lazy vals should be evaluated lazily. In the abstract semantics, we over-approximate lazy vals by
treating them as parameter-less methods. The abstract cache will guard against non-terminating
recursion and avoids unnecessary re-evaluation.
Copy link
Contributor

@olhotak olhotak left a comment

Choose a reason for hiding this comment

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

LGTM

@liufengyun liufengyun marked this pull request as ready for review November 20, 2023 20:38
@liufengyun liufengyun merged commit 39ec69f into scala:main Nov 22, 2023
18 checks passed
@liufengyun liufengyun deleted the fix-init-local-lazy-val branch November 22, 2023 07:13
@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