Skip to content

Commit f7523de

Browse files
committed
set add missing fallback case for __sub__
1 parent 7e2021b commit f7523de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ PBaseSet doPBaseSet(PFrozenSet left, PBaseSet right) {
218218
HashingStorage storage = getDiffNode().execute(left.getDictStorage(), right.getDictStorage());
219219
return factory().createSet(storage);
220220
}
221+
222+
@Fallback
223+
Object doSub(Object self, Object other) {
224+
throw raise(PythonErrorType.TypeError, "unsupported operand type(s) for -: %p and %p", self, other);
225+
}
221226
}
222227

223228
@Builtin(name = __CONTAINS__, fixedNumOfArguments = 2)

0 commit comments

Comments
 (0)