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

Update spans used for some type mismatch errors #1098

Merged
merged 2 commits into from
Feb 3, 2024
Merged

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Jan 31, 2024

This change adds some additonal logic to better select error spans and expected/actual types for both if-expressions and callable blocks.

Fixes #970

This change adds some additonal logic to better select error spans and expected/actual types for both if-expressions and callable blocks.

Fixes #970
Copy link
Collaborator Author

@swernli swernli left a comment

Choose a reason for hiding this comment

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

See screenshots and discussion in linked issue for more context

Copy link

Benchmark for 7495a6e

Click to view benchmark
Test Base PR %
Array append evaluation 858.6±8.48µs 880.8±9.21µs +2.59%
Array update evaluation 932.9±6.87µs 954.8±5.80µs +2.35%
Deutsch-Jozsa evaluation 31.3±0.19ms 31.4±0.21ms +0.32%
Large file parity evaluation 36.1±0.17ms 36.1±0.30ms 0.00%
Large input file 37.9±0.68ms 37.9±0.58ms 0.00%
Standard library 20.9±0.41ms 20.8±0.32ms -0.48%
Teleport evaluation 104.8±3.13µs 106.1±2.15µs +1.24%

@swernli swernli added this pull request to the merge queue Feb 3, 2024
Merged via the queue into main with commit 65a7fff Feb 3, 2024
14 checks passed
@swernli swernli deleted the swernli/ty-err-spans branch February 3, 2024 02:25
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.

Need better error placement for return type mismatch in case when actual type is Unit
3 participants