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

Treat @meth annotation as making the type uncurried. #5845

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

cristianoc
Copy link
Collaborator

@cristianoc cristianoc commented Nov 24, 2022

This restores examples in the documentation that have been broken since compiler version 9.0:

type person = {@meth "say": (string, string) => unit}

@val external john: person = "john"

john["say"]("hey", "jude")

Since there's no way in the .res syntax to call methods, the @meth annotation simply makes the type uncurried.

So in practice it's just redundant and can be removed in future.

This restores examples in the documentation that have been broken:
```res
type person = {@meth "say": (string, string) => unit}

@Val external john: person = "john"

john["say"]("hey", "jude")
```

Since there's no way in the `.res` syntax to call methods, the `@meth` annotation simply makes the type uncurried.
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.

None yet

1 participant