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

AoC: scanf missing and error referring to --UNDEFINED-- #4546

Closed
fridis opened this issue Dec 21, 2024 · 0 comments · Fixed by #4644
Closed

AoC: scanf missing and error referring to --UNDEFINED-- #4546

fridis opened this issue Dec 21, 2024 · 0 comments · Fixed by #4644
Assignees
Labels
base library related to the Fuzion base library 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 Dec 21, 2024

While playing around with dec 20 solution, tried to use different versions of Sequence.scan just to find that there is none that takes a function, only a monoid is allowed.

But passing a function (+) results in an error referring to --UNDEFINED--:

 > $FUZION/bin/fz -e 'say <| (1 :: id).scan (+)'

command line:1:23: error 1: Incompatible types when passing argument in a call
say <| (1 :: id).scan (+)

Actual type for argument #1 'm' does not match expected type.
In call to          : 'list.scan'
expected formal type: 'Monoid i32'
actual type found   : '--UNDEFINED--'
assignable to       : '--UNDEFINED--'
for value assigned  : '(+)'
To solve this, you could change the type of the target 'm' to '--UNDEFINED--' or convert the type of the assigned value to 'Monoid i32'.

one error.

@fridis fridis added enhancement New feature or request base library related to the Fuzion base library front end related to the front end until .fum file is created: call and type resolution, type checking, etc. labels Dec 21, 2024
@fridis fridis changed the title AoC: scanf missing and error referring to `--UNDEFINED-- AoC: scanf missing and error referring to --UNDEFINED-- Dec 21, 2024
@fridis fridis changed the title AoC: scanf missing and error referring to --UNDEFINED-- AoC: scanf missing and error referring to --UNDEFINED-- Dec 21, 2024
simonvonhackewitz added a commit to simonvonhackewitz/fuzion that referenced this issue Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base library related to the Fuzion base library 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

Successfully merging a pull request may close this issue.

2 participants