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

error message: private extension without body #6175

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

aspeddro
Copy link
Contributor

@aspeddro aspeddro commented Apr 18, 2023

TODO:

  • Update CHANGELOG

Close #5632

@@ -0,0 +1,2 @@
%%private
let a = 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way to make the error message more approachable. Not so clear why a "does not have a body".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message highlights %private. It's not a that doesn't have a body, it's %%private.

image

Maybe %%private extension expects arguments?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes: private expects the definition as argument.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: The '%%private' extension expects a definition as its argument.

Example usage:
%%private
let a = (x) => x + 2;

In this case, the '%%private' extension is missing a definition as its argument. Please provide a valid definition for the private extension to work as intended.

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@cristianoc cristianoc merged commit 96dee17 into rescript-lang:master Apr 18, 2023
13 checks passed
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.

%%private without body should not be allowed
2 participants