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: No new resolver crash with partially resolved datatype update expressions #5440

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

MikaelMayer
Copy link
Member

@MikaelMayer MikaelMayer commented May 14, 2024

Fixes #5331
Fixes #5365

The only part that fixes the issue is the last line end of the file PreTypeResolve.Expressions.cs, the rest is an automated conversion If/then/else to a switch statement that helped debugging and makes the code easier to maintain.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@MikaelMayer MikaelMayer self-assigned this May 14, 2024
@MikaelMayer MikaelMayer enabled auto-merge (squash) May 23, 2024 16:14
RustanLeino
RustanLeino previously approved these changes May 23, 2024
Copy link
Collaborator

@RustanLeino RustanLeino left a comment

Choose a reason for hiding this comment

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

The fix itself looks good. For the if/switch refactoring, I only did a quick scan.

Comment on lines 4 to 8
datatype S = S(
n:nat
) {
function f():S { this }
function g():S { this.(n := 0).f() }
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file contains the failing test in Issue #5365, right? If so, should the name of the file reflect this?

RustanLeino
RustanLeino previously approved these changes May 24, 2024
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.

internal error: function call on datatype with updated member Internal Error: System.NullReferenceException
2 participants