Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauernfeind committed Oct 27, 2021
1 parent 55bf280 commit 7f691da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ else if (fromBoxedType) {
if (toPrimitive && !ret.equals(boolean.class) && !ret.equals(exprType)) {
// Casting to a primitive, except booleans and the identity conversion
printer.append(ret.getSimpleName());
if (isAssignableFrom(PyObject.class, exprType)) {
if (exprType != NULL_CLASS && isAssignableFrom(PyObject.class, exprType)) {
printer.append("PyCast((PyObject)");
} else {
printer.append("Cast(");
Expand Down

0 comments on commit 7f691da

Please sign in to comment.