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

Add nodes with no edges to the dependency graph #2390

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Sep 25, 2023

Consider this:

let 
 x : _ := 0
in ...

When translating the let to internal, we build the dependency graph and then use that to group definitions in mutually recursive blocks. Since x has no edge, it was not being added to the dependency graph, so it was not being translated to Internal, thus crashing later during inference.

@janmasrovira janmasrovira self-assigned this Sep 25, 2023
@janmasrovira janmasrovira linked an issue Sep 25, 2023 that may be closed by this pull request
@janmasrovira janmasrovira changed the title Fix Fix error related to numeric types and holes Sep 25, 2023
@janmasrovira janmasrovira changed the title Fix error related to numeric types and holes Fix bug related to numeric types and holes Sep 25, 2023
@janmasrovira janmasrovira force-pushed the 2373-type-inference-crashes-in-lets-for-numeric-types branch from 2ae31ea to 1080d44 Compare September 26, 2023 08:09
@janmasrovira janmasrovira marked this pull request as ready for review September 26, 2023 08:09
@lukaszcz lukaszcz force-pushed the 2373-type-inference-crashes-in-lets-for-numeric-types branch from 1080d44 to c60a8a7 Compare September 26, 2023 10:21
@janmasrovira janmasrovira changed the title Fix bug related to numeric types and holes Add nodes with no edges to the dependency graph Sep 26, 2023
@lukaszcz lukaszcz merged commit 27df394 into main Sep 26, 2023
4 checks passed
@lukaszcz lukaszcz deleted the 2373-type-inference-crashes-in-lets-for-numeric-types branch September 26, 2023 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type inference crashes in lets for numeric types
2 participants