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

Wrong structure on let b = 1 = 1 in (OCaml) #409

Closed
nahoj opened this issue May 3, 2023 · 7 comments
Closed

Wrong structure on let b = 1 = 1 in (OCaml) #409

nahoj opened this issue May 3, 2023 · 7 comments

Comments

@nahoj
Copy link

nahoj commented May 3, 2023

plugin version: 0.111-2023.1

Description

This code is parsed into the wrong structure:

let f () =
  let b : bool = 1 = 1 in
  let x = 0 in
  x
  • test.ml
    • f
      • b
    • x
@nahoj
Copy link
Author

nahoj commented May 3, 2023

However, parentheses fix it:

let f () =
  let b : bool = (1 = 1) in
  let x = 0 in
  x
  • test.ml
    • f
      • b
      • x

@giraud
Copy link
Owner

giraud commented May 5, 2023

Fixed in 0.112

@giraud giraud closed this as completed May 5, 2023
@nahoj
Copy link
Author

nahoj commented May 5, 2023

It looks like the fix doesn't support general expressions, e.g.:

let f () =
  let b : bool = ignore () = () in
  let x = 0 in
  x
  • test.ml
    • f
      • b
    • x

Thank you for all the other fixes; that was fast!

@giraud giraud reopened this May 5, 2023
giraud added a commit that referenced this issue May 15, 2023
@giraud
Copy link
Owner

giraud commented May 29, 2023

@nahoj can you test with 0.113 please ?

@giraud giraud closed this as completed May 29, 2023
@giraud giraud reopened this May 29, 2023
@nahoj
Copy link
Author

nahoj commented May 29, 2023

It works on the previous example, but not on this one:

let f () =
  let b : bool = ignore "" = () in
  let x = 0 in
  x

giraud added a commit that referenced this issue Jul 5, 2023
giraud added a commit that referenced this issue Aug 22, 2023
@giraud
Copy link
Owner

giraud commented Aug 22, 2023

It should be ok in 0.115

@giraud giraud closed this as completed Aug 22, 2023
@nahoj
Copy link
Author

nahoj commented Aug 23, 2023

Thank you.

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