9
$\begingroup$

Bug introduced in 10.1 and fixed in 10.2.0


Perhaps Union on Associations is not being encouraged since Join is preferred given Key-Value shadowing.

Join[<|a -> 1|>, <|a -> 1|>]

<|a -> 1|>

Join[<|a -> 1|>, <|a -> 2|>]

<|a -> 2|>

... although doing so by a complete kernel kill seems a tad drastic?

Union[<|a -> 1|>, <|a -> 2|>]

(* i.e. don't evaluate if you don't want to lose current definitions *)
$\endgroup$
  • $\begingroup$ At first pass, shouldn't Union do the same thing as Join on Associations? $\endgroup$ – Ronald Monson Jul 14 '15 at 0:45
  • $\begingroup$ Reproducible crash confirmed in 10.1.0 under Windows. $\endgroup$ – Mr.Wizard Jul 14 '15 at 0:50
  • 7
    $\begingroup$ This is a bug and has been fixed in version 10.2 which should be available very soon. $\endgroup$ – ilian Jul 14 '15 at 0:50
  • $\begingroup$ @ilian Do you know when the bug first appeared? I would like to mark it in this post if possible. $\endgroup$ – Mr.Wizard Jul 14 '15 at 0:51
  • $\begingroup$ @ilian Ok, (error message or same output as Join) $\endgroup$ – Ronald Monson Jul 14 '15 at 0:51
5
$\begingroup$

Posting ilian's comment as an answer.

This bug has been fixed in version 10.2.0.

$Version
Union[<|a -> 1|>, <|a -> 2|>]
(* "10.2.0 for Linux x86 (64-bit) (July 6, 2015)" *)
(* <|a -> 1|> \[Union] <|a -> 2|> *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.