Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions numba_cuda/numba/cuda/cext/_typeconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ select_overload(PyObject* self, PyObject* args)
TypeManager *tm = unwrap_TypeManager(tmcap);
if (!tm) {
BAD_TM_ARGUMENT;
return NULL;
}

Py_ssize_t sigsz = PySequence_Size(sigtup);
Expand Down
5 changes: 5 additions & 0 deletions numba_cuda/numba/cuda/tests/cudapy/test_typeconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import itertools

from numba.cuda import types
from numba.cuda.cext import _typeconv
from numba.cuda.typeconv.typeconv import TypeManager, TypeCastingRules
from numba.cuda.typeconv import rules
from numba.cuda.typeconv import castgraph, Conversion
Expand Down Expand Up @@ -94,6 +95,10 @@ def test_typeconv(self):
with self.assertRaises(TypeError):
sel = tm.select_overload(sig, ovs, False, False)

def test_select_overload_bad_type_manager(self):
with self.assertRaises(TypeError):
_typeconv.select_overload(None, (), (), True, False)

def test_default_rules(self):
tm = rules.default_type_manager
self.check_number_compatibility(tm.check_compatible)
Expand Down