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

Cannot have traits with function as arguments #158

Closed
Champii opened this issue Aug 30, 2022 · 1 comment
Closed

Cannot have traits with function as arguments #158

Champii opened this issue Aug 30, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Champii
Copy link
Owner

Champii commented Aug 30, 2022

trait MyTrait a
  my_func: a => (a => b) => b

impl MyTrait Int64
  @my_func: f -> f @

handler: x -> x.show!

main: -> (2).my_func handler .print!

This fails, but this works:

my_func: a => (a => b) => b
my_func: x, f -> f x

handler: x -> x.show!

main: -> my_func 2, handler .print!
@Champii
Copy link
Owner Author

Champii commented Aug 31, 2022

Fixed in #156

@Champii Champii closed this as completed Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant