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

Spelling suggestions will repeat the same name in the presence of opened modules #7864

Closed
vicuna opened this issue Oct 18, 2018 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Oct 18, 2018

Original bug ID: 7864
Reporter: ggole
Assigned to: @nojb
Status: resolved (set by @nojb on 2018-11-05T12:25:46Z)
Resolution: fixed
Priority: normal
Severity: trivial
Version: 4.06.1
Fixed in version: 4.08.0+dev/beta1/beta2
Category: toplevel
Monitored by: @nojb

Bug description

When the same name is defined at top level and in opened modules, spelling suggestions will list that name, unqualified, multiple times. The result is slightly ridiculous:

Hint: Did you mean foo, foo or foo?

Steps to reproduce

Define the same name in several modules and open them. Then misspell that identifier such that spelling suggestions are made.

    OCaml version 4.06.1

module A = struct let foo = () end;;

module A : sig val foo : unit end

module B = struct let foo = () end;;

module B : sig val foo : unit end

open A;;

open B;;

let foo = ();;

val foo : unit = ()

fop;;

Characters 0-3:
fop;;
^^^
Error: Unbound value fop
Hint: Did you mean foo, foo or foo?

@vicuna
Copy link
Author

vicuna commented Nov 5, 2018

Comment author: @Armael

Fixed by #2109.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants