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

Module.load produces duplicate bindings #359

Open
rexim opened this issue May 27, 2017 · 0 comments
Open

Module.load produces duplicate bindings #359

rexim opened this issue May 27, 2017 · 0 comments
Labels

Comments

@rexim
Copy link
Member

rexim commented May 27, 2017

Reproduction

It doesn't have any significant side effects (except probably slightly higher memory consumption), so it's easier to reproduce that in the code.

Copy the following code to REPL:

import me.rexim.morganey.module._
{
  new Module(CanonicalPath("std.prelude"))
    .load()
    .map { bindings =>
      bindings
        .map(_.variable.name)
        .groupBy(identity)
        .mapValues(_.length)
    }
}

Expected

All binding counts are 1

Observed

Some bindings are repeated up to 6 times

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

No branches or pull requests

1 participant