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

Unknown syntax error when trying to pass module as named parameter #1468

Closed
ulrikstrid opened this issue Oct 7, 2017 · 3 comments
Closed
Labels
Error messages confusing, missing, or just weak error messages

Comments

@ulrikstrid
Copy link
Contributor

Not sure if you want these issues but the compiler told me to add it.

Repro:

let maker ::SomeModule => SomeModule.make ();
@chenglou
Copy link
Member

chenglou commented Oct 7, 2017

What's the message?

This is a syntax error that we should guard against, yes.

@ulrikstrid
Copy link
Contributor Author

:: is not supported in Reason, please use [hd, ...tl] instead

  We've found a bug for you!
  /home/ulrik/src/error-test/src/ErrorTest.re

  There's been an error running Reason's refmt parser on a file.
  This was the command:

  /home/ulrik/src/error-test/node_modules/bs-platform/bin/refmt.exe --print binary '/home/ulrik/src/error-test/src/ErrorTest.re' > /tmp/ocamlppc236cb

  Please file an issue on github.com/facebook/reason. Thanks!

ninja: error: rebuilding 'build.ninja': subcommand failed
>>>> Finish compiling

This is a weird error as I was expecting it to be a named parameter, was trying to pass a module as a parameter.

@jaredly jaredly added the Error messages confusing, missing, or just weak error messages label Jun 14, 2018
@anmonteiro
Copy link
Member

Error after #2480:

$ echo "let maker = (~SomeModule) => SomeModule.make ();" | ./_build/install/default/bin/refmt
File "", line 1, characters 14-24:
Error: variables and labels should be lowercased. Try `someModule'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error messages confusing, missing, or just weak error messages
Projects
None yet
Development

No branches or pull requests

4 participants