9

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 *)
jkuczm
  • 15,078
  • 2
  • 53
  • 84
Ronald Monson
  • 6,076
  • 26
  • 46

1 Answers1

5

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|> *)
jkuczm
  • 15,078
  • 2
  • 53
  • 84