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

Fixing record inference and making SymbolResolver deterministic again #1476

Merged
merged 4 commits into from
Mar 27, 2024

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Mar 26, 2024

This PR changes the type that is forwarded to the inference type. Previously any type (including a pointer type) was forwarded to inferRecordDeclaration. This was not working for pointer types. Now instead, the root type is used, which points to the element type in case of (chained) pointer types. Also changed an error message in the scope manager to a warning and improved logging in the inference system slightly.

This also makes the behaviour of the SymbolResolver deterministic again, this was caused by a unfortunate combination of toSet calls.

Fixes #1475

This PR changes the type that is forwarded to the inference type. Previously any type (including a pointer type) was forwarded to `inferRecordDeclaration`. This was not working for pointer types. Now instead, the `root` type is used, which points to the element type in case of (chained) pointer types.

Also changed an error message in the scope manager to a warning and improved logging in the inference system slightly.

Fixes #1475
@oxisto oxisto requested a review from konradweiss as a code owner March 26, 2024 11:22
@oxisto oxisto requested a review from peckto as a code owner March 26, 2024 13:27
@oxisto oxisto changed the title Fixing record declaration inference for pointer types. Fixing record declaration and making SymbolResolver deterministic again Mar 26, 2024
@oxisto oxisto changed the title Fixing record declaration and making SymbolResolver deterministic again Fixing record inference and making SymbolResolver deterministic again Mar 26, 2024
@oxisto oxisto enabled auto-merge (squash) March 27, 2024 08:46
Copy link

@oxisto oxisto merged commit 3c6411d into main Mar 27, 2024
3 checks passed
@oxisto oxisto deleted the fix-pointer-type-inference branch March 27, 2024 08:55
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.

Inference of method and record fails with pointer type
3 participants