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

Error on HashSet & HashMap when range insertions #41

Closed
samchon opened this issue Jul 12, 2019 · 0 comments
Closed

Error on HashSet & HashMap when range insertions #41

samchon opened this issue Jul 12, 2019 · 0 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@samchon
Copy link
Owner

samchon commented Jul 12, 2019

Summary

  • TSTL Version: 2.2.0
  • Expected behavior: Prevent duplicated items' insertion
  • Actual behavior: Cannot assure unique insertion

Code occuring the bug

import std = require("tstl");

function main(): void
{
    let v: std.Vector<number> = new Vector([1, 2, 2, 3, 3, 3]);
    let s: std.HashSet<number> = new HashSet();
    
    s.insert(v.begin(), v.end()); // range insertion
    s.push(...v); // push multiple items at once

    console.log(...s); 
        // Expected value: [1, 2, 3] 
        // Actual value: [1, 2, 2, 3, 3, 3, 1, 2, 2, 3, 3, 3]
}
@samchon samchon added the bug Something isn't working label Jul 12, 2019
@samchon samchon self-assigned this Jul 12, 2019
@samchon samchon added this to To do in v2.2 Update via automation Jul 12, 2019
@samchon samchon moved this from To do to In progress in v2.2 Update Jul 12, 2019
v2.2 Update automation moved this from In progress to Done Jul 14, 2019
@samchon samchon moved this from Done to Patch in v2.2 Update Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
v2.2 Update
  
Patch
Development

No branches or pull requests

1 participant