Skip to content

Float negation operator cause a runtime error #5736

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

Closed
nyinyithann opened this issue Oct 16, 2022 · 0 comments
Closed

Float negation operator cause a runtime error #5736

nyinyithann opened this issue Oct 16, 2022 · 0 comments

Comments

@nyinyithann
Copy link

The following throws compile time error.

let n: float = -9.9
-n->Js.log

The following cause a runtime error.

let n: float = -9.9
-.n->Js.log 

It produces JS code:

console.log(--9.9);
cristianoc added a commit that referenced this issue Oct 16, 2022
cristianoc added a commit that referenced this issue Oct 16, 2022
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

No branches or pull requests

2 participants