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

feature: fine-granular type system #81

Merged
merged 4 commits into from
May 27, 2024
Merged

feature: fine-granular type system #81

merged 4 commits into from
May 27, 2024

Conversation

SirYwell
Copy link
Owner

Fixes #18.
This change allows more fine-granular analysis as parameters and return types are not represented by PsiType anymore, but instead our own type system that can have bottom and top types itself.

One example where this is beneficial:
sharpening

Before, identity would just be a bottom type, and dropReturn could not make it any more precise. Now we know that dropped will have a void return type even if the parameter is still unknown.

Note that this PR is not perfect. It might result in wrong/unexpected types when any inputs are somehow incompatible or unknown or bad. Future work will make more methods more precise and correct.

@SirYwell SirYwell merged commit 54b0d72 into main May 27, 2024
6 checks passed
@SirYwell SirYwell deleted the feature/rework-typing branch May 27, 2024 17:11
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.

Better handling of unknown types
1 participant