summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'bindings')
-rw-r--r--bindings/python/tests/cindex/test_type.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_type.py b/bindings/python/tests/cindex/test_type.py
index ed3d65c378..62968d6285 100644
--- a/bindings/python/tests/cindex/test_type.py
+++ b/bindings/python/tests/cindex/test_type.py
@@ -369,3 +369,13 @@ struct Test {
assert teststruct.type.get_offset("bar") == bar
+def test_decay():
+ """Ensure decayed types are handled as the original type"""
+
+ tu = get_tu("void foo(int a[]);")
+ foo = get_cursor(tu, 'foo')
+ a = foo.type.argument_types()[0]
+
+ assert a.kind == TypeKind.INCOMPLETEARRAY
+ assert a.element_type.kind == TypeKind.INT
+ assert a.get_canonical().kind == TypeKind.INCOMPLETEARRAY