synonymsDict.hasOwnProperty(n)) section a bit mysterious
increpare opened this issue · 0 comments
increpare commented
What does this section do? How to trigger it?
PuzzleScript/src/js/compiler.js
Line 284 in 8f3f8ae
var modified = true;
while (modified) {
modified = false;
for (var n in synonymsDict) {
if (synonymsDict.hasOwnProperty(n)) {
var value = synonymsDict[n];
if (value in propertiesDict) {
delete synonymsDict[n];
propertiesDict[n] = propertiesDict[value];
modified = true;
} else if (value in aggregatesDict) {
delete aggregatesDict[n];
aggregatesDict[n] = aggregatesDict[value];
modified = true;
} else if (value in synonymsDict) {
synonymsDict[n] = synonymsDict[value];
}
}
}
ditto for the aggregate section after (which is at least partially covered by the "Cannot define an aggregate in terms of properties" test)