From 4f5221e7fe44ee5fb1a1df422d6e317ccd87d6ac Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Tue, 18 Feb 2020 17:12:19 +0100 Subject: vala: Handle PointerType and VoidType in Constant.check_const_type() This caused criticals like: vala_typesymbol_is_subtype_of: assertion 'self != NULL' failed --- tests/Makefile.am | 1 + tests/semantic/constant-pointer.test | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 tests/semantic/constant-pointer.test (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index f683d18c7..071935bd1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -733,6 +733,7 @@ TESTS = \ semantic/class-too-few-type-arguments.test \ semantic/class-too-many-type-arguments.test \ semantic/constant-extern.test \ + semantic/constant-pointer.test \ semantic/constant-value.test \ semantic/constant-value-missing.test \ semantic/constant-value-type.test \ diff --git a/tests/semantic/constant-pointer.test b/tests/semantic/constant-pointer.test new file mode 100644 index 000000000..23235c23e --- /dev/null +++ b/tests/semantic/constant-pointer.test @@ -0,0 +1,6 @@ +Invalid Code + +const int* FOO = 0; + +void main () { +} -- cgit v1.2.1