Skip to content

Commit d0b0c1e

Browse files
author
Zach Olstein
committed
Pass through cls when constructing no-argument set
Adds cls as an argument to factory.createSet in the no-argument specialization of the set constructor. Without this, attempts to instantiate a subclass of set with no arguments will instead create a regular set.
1 parent d57dca3 commit d0b0c1e

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/set

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/set/SetNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ PSet setString(VirtualFrame frame, LazyPythonClass cls, String arg,
9393
@SuppressWarnings("unused")
9494
PSet set(LazyPythonClass cls, PNone none,
9595
@Shared("factory") @Cached PythonObjectFactory factory) {
96-
return factory.createSet();
96+
return factory.createSet(cls);
9797
}
9898

9999
@Specialization(guards = "!isNoValue(iterable)")

0 commit comments

Comments
 (0)