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

inconsistent arguments count is not detected #259

Open
yegor256 opened this issue Jan 21, 2025 · 2 comments
Open

inconsistent arguments count is not detected #259

yegor256 opened this issue Jan 21, 2025 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@yegor256
Copy link
Member

yegor256 commented Jan 21, 2025

Imagine this EO program:

[] > foo
  bar 42 > x
  bar 1 2 3 > y

It's illegal, because two objects with the same @base have different number of arguments.

We should check this on the level of Programs, not a single XMIR file.

This should lead to a warning, not error.

@maxonfjvipon
Copy link
Member

@yegor256 what about partial application?

@yegor256
Copy link
Member Author

@maxonfjvipon it's possible, but very rarely. That's why it's a warning. When someone will use partial application, they will add +unlint to the program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants