Something weird is going on . First mySet is a map, and then you add a set to it and the variable mySet
is suddenly a set that contains the previous map and the new element you added. It looks to me that +=
has a bug.
If you want to add several elements to a set, you should start with a set and add elements to it like so:
rascal>mySet = { |project://Test| ,1, "test" }; // simply create the set with 3 different elements in it
set[value]: { |project://Test| ,1, "test" }
Or you could start with an empty set and add elements:
rascal>mySet = {};
set[void]: {}
rascal>mySet += 1;
set[int]: {1}
rascal>mySet += |project://Test|;
set[value]: {1, |project://Test|}
rascal>mySet += "test";
set[value]: {1, |project://Test|, "test"}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…