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

Confusing error shown when type feature is called with wrong arg count #3341

Open
fridis opened this issue Jul 9, 2024 · 0 comments
Open
Labels
enhancement New feature or request front end related to the front end until .fum file is created: call and type resolution, type checking, etc.

Comments

@fridis
Copy link
Member

fridis commented Jul 9, 2024

The following code declares a type x and a type feature x.type.y with two arguments, but calls y with three arguments

x.y 1 2 3

x(a,b,c i32) is

  type.y(i,j i32) =>

The error reported, however, complains about x being called with the wrong number of arguments:

 > ./build/bin/fz test_typefeature.fz 

/home/fridi/fuzion/work/test_typefeature.fz:1:1: error 1: Different count of arguments needed when calling feature
x.y 1 2 3
^
Feature not found: 'x' (no arguments)
Target feature: 'universe'
In call: 'x'
To solve this, you might change the actual number of arguments to match the feature 'x' (3 arguments) at /home/fridi/fuzion/work/test_typefeature.fz:3:1:
x(a,b,c i32) is
^

one error.

@fridis fridis added enhancement New feature or request front end related to the front end until .fum file is created: call and type resolution, type checking, etc. labels Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request front end related to the front end until .fum file is created: call and type resolution, type checking, etc.
Projects
None yet
Development

No branches or pull requests

1 participant