Skip to content

Commit 113fe19

Browse files
committed
[GR-20728] Pass through cls when constructing no-argument set
PullRequest: graalpython/787
2 parents c839cf4 + f4847af commit 113fe19

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -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)")

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/object/PythonObjectFactory.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,6 @@ public PList createList(LazyPythonClass cls, Object[] array) {
453453
return trace(new PList(cls, SequenceStorageFactory.createStorage(array)));
454454
}
455455

456-
public PSet createSet() {
457-
return trace(new PSet(PythonBuiltinClassType.PSet));
458-
}
459-
460456
public PSet createSet(LazyPythonClass cls) {
461457
return trace(new PSet(cls));
462458
}

0 commit comments

Comments
 (0)