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

Add failing completion test #644

Merged

Conversation

fhammerschmidt
Copy link
Member

Added the failing test mentioned in #643

The funny thing is, I tried to change the Js.log("Hello") to a () which made the second completion work as well. No idea what's going on there.

@cristianoc
Copy link
Collaborator

Looks like it's not what comes before, but what follows.

First

Completable: Cpath Value[ReactEvent, ""]

then

Completable: Cpath Value[ReactEvent, "", log]

so parser recovery somehow picks up log too.

@cristianoc
Copy link
Collaborator

For context, this is a correct program:

module S = {
type r = {xx:int}
}

let r = {S.xx:10}

let f = r.
S.xx

so playing with parser recovery is a little tricky in these cases.

@cristianoc
Copy link
Collaborator

@fhammerschmidt should behave as expected now.
There's some logic to detect when foo. (with empty space) is followed by a valid possible path continuation, but it would not handle well the situation where the path after . has more than 1 element.

@cristianoc cristianoc merged commit a61cc75 into rescript-lang:master Dec 1, 2022
@fhammerschmidt fhammerschmidt deleted the failing-completion-test branch December 1, 2022 21:51
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.

2 participants