Skip to content

Commit dc0ef4f

Browse files
committed
set literal: left to right expression evaluation (as expected)
1 parent 6d68f1c commit dc0ef4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/PythonBaseTreeTranslator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import java.util.Arrays;
4141
import java.util.Collection;
4242
import java.util.Deque;
43-
import java.util.HashSet;
43+
import java.util.LinkedHashSet;
4444
import java.util.List;
4545
import java.util.Set;
4646
import java.util.function.Function;
@@ -424,7 +424,7 @@ public Object visitAtom(Python3Parser.AtomContext ctx) {
424424
public Object visitSetmaker(Python3Parser.SetmakerContext ctx) {
425425
if (ctx.comp_for() == null) {
426426
List<PNode> nodes = asList(super.visitSetmaker(ctx));
427-
Set<PNode> setNodes = new HashSet<>(nodes);
427+
Set<PNode> setNodes = new LinkedHashSet<>(nodes);
428428
return factory.createSetLiteral(setNodes);
429429
} else {
430430
return factory.callBuiltin(SET, createComprehensionExpression(ctx));

0 commit comments

Comments
 (0)