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

checker: error if cannot generic infer type from empty array ([]) #22885

Closed
wants to merge 4 commits into from

Conversation

Delta456
Copy link
Member

@Delta456 Delta456 commented Nov 17, 2024

@Delta456 Delta456 marked this pull request as draft November 17, 2024 10:37
@spytheman
Copy link
Member

This should not be solved like this. The main problem is that the generic function expansion, produced an error, that is far removed from the actual source that the user wrote.

The compiler should just add more details to the error, so that the user can know what was the origin of the problem.

It was discussed here before: https://discord.com/channels/592103645835821068/592114487759470596/1306501688454287451 .

@spytheman spytheman closed this Nov 17, 2024
@Delta456 Delta456 deleted the checker_infer_arr branch November 17, 2024 11:27
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.

arrays.sum([]) or {panic(err)} produces a misleading/obscure error message:
2 participants