summaryrefslogtreecommitdiff
path: root/tests/errors/cpp_object_template.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors/cpp_object_template.pyx')
-rw-r--r--tests/errors/cpp_object_template.pyx11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/errors/cpp_object_template.pyx b/tests/errors/cpp_object_template.pyx
index a90bdedff..e1a15c905 100644
--- a/tests/errors/cpp_object_template.pyx
+++ b/tests/errors/cpp_object_template.pyx
@@ -1,4 +1,5 @@
# mode: error
+# tag: cpp
from libcpp.vector cimport vector
@@ -11,7 +12,13 @@ def main():
cdef vector[A] va
va.push_back(A())
+def memview():
+ import array
+ cdef vector[int[:]] vmv
+ vmv.push_back(array.array("i", [1,2,3]))
+
_ERRORS = u"""
-9:16: Python object type 'Python object' cannot be used as a template argument
-11:16: Python object type 'A' cannot be used as a template argument
+10:15: Python object type 'Python object' cannot be used as a template argument
+12:15: Python object type 'A' cannot be used as a template argument
+17:15: Reference-counted type 'int[:]' cannot be used as a template argument
"""