Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Pipe first has higher priority than ! #203

Closed
bloodyowl opened this issue Dec 9, 2020 · 6 comments
Closed

Pipe first has higher priority than ! #203

bloodyowl opened this issue Dec 9, 2020 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed stale

Comments

@bloodyowl
Copy link
Contributor

let a = "foo"
let x = !a->Js.String.includes("f") // doesn't compile (a should be a bool)
let x = !(a->Js.String.includes("f")) // compiles

That seems like a regression from the original syntax

@IwanKaramazow
Copy link
Contributor

Yes, this is currently the case. I'll look into this.

@bloodyowl
Copy link
Contributor Author

Same goes for object access:

let timezone = Intl.DateTimeFormat.make()->Intl.DateTimeFormat.resolvedOptions["timeZone"]

@IwanKaramazow
Copy link
Contributor

Still on my TODO-list 😅

@ryyppy ryyppy added the bug Something isn't working label May 2, 2022
@ryyppy ryyppy added this to the Possible 9.4 milestone May 2, 2022
@ryyppy ryyppy modified the milestone: v10.1 May 17, 2022
@cristianoc cristianoc added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 11, 2022
@a-c-sreedhar-reddy
Copy link
Contributor

a-c-sreedhar-reddy commented Jul 11, 2022

According to the language, which operator should have more preference? -> (or) ! ?

@a-c-sreedhar-reddy
Copy link
Contributor

@ryyppy @cristianoc @IwanKaramazow

OCaml throws an error
image

@stale
Copy link

stale bot commented May 28, 2023

The rescript-lang/syntax repo is obsolete and will be archived soon. If this issue is still relevant, please reopen in the compiler repo (https://github.com/rescript-lang/rescript-compiler) or comment here to ask for it to be moved. Thank you for your contributions.

@stale stale bot added the stale label May 28, 2023
@stale stale bot closed this as completed Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed stale
Projects
None yet
Development

No branches or pull requests

5 participants