summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2023-04-13 08:25:02 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2023-04-13 08:48:53 +0200
commit0b2e7537e5575f1daabb37e93b5f74c78fd29eff (patch)
tree9b069b851fe5aef11865538d77cb9009ce6659c9 /tests
parent5abae64280233454d784c46e0d32804d05ad2aeb (diff)
downloadvala-0b2e7537e5575f1daabb37e93b5f74c78fd29eff.tar.gz
codegen: Return CCodeInvalidExpression instead of null
This fixes the following criticals: vala_ccode_cast_expression_construct: assertion 'expr != NULL' failed vala_ccode_function_call_add_argument: assertion 'expr != NULL' failed Remove dead code, this is already handled in get_dup_func_expression()
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/semantic/interface-prerequisite-missing-class.test11
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2e22aa6db..b7a46cb31 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1191,6 +1191,7 @@ TESTS = \
semantic/initializer-unknown-type.test \
semantic/interface-prerequisite-invalid.test \
semantic/interface-prerequisite-less-accessible.test \
+ semantic/interface-prerequisite-missing-class.test \
semantic/interface-prerequisite-multiple.test \
semantic/interface-prerequisite-too-few-type-arguments.test \
semantic/interface-prerequisite-too-many-type-arguments.test \
diff --git a/tests/semantic/interface-prerequisite-missing-class.test b/tests/semantic/interface-prerequisite-missing-class.test
new file mode 100644
index 000000000..3e4a9e3fb
--- /dev/null
+++ b/tests/semantic/interface-prerequisite-missing-class.test
@@ -0,0 +1,11 @@
+Invalid Code
+
+interface IFoo {
+}
+
+class Foo<T> {
+}
+
+void main () {
+ var foo = new Foo<IFoo> ();
+}