summaryrefslogtreecommitdiff
path: root/codegen
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2023-03-20 15:18:00 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2023-03-20 16:25:10 +0100
commit9c35019ef300082243ef7c71c22088c52d3db38e (patch)
tree2d288fa16f9b0141ce64aab5402e5d0ba0517f78 /codegen
parent6a0cb1546b1e86859a3fce00c27abfc62ba50d8e (diff)
downloadvala-9c35019ef300082243ef7c71c22088c52d3db38e.tar.gz
vala: Allow assignment of namespace fields with inline allocated arrays
Fixes https://gitlab.gnome.org/GNOME/vala/issues/945
Diffstat (limited to 'codegen')
-rw-r--r--codegen/valaccodebasemodule.vala2
1 files changed, 2 insertions, 0 deletions
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index cf72070eb..79e9f362a 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1458,6 +1458,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
public static bool is_constant_ccode_expression (CCodeExpression cexpr) {
if (cexpr is CCodeConstant || cexpr is CCodeConstantIdentifier) {
return true;
+ } else if (cexpr is CCodeInitializerList) {
+ return true;
} else if (cexpr is CCodeCastExpression) {
var ccast = (CCodeCastExpression) cexpr;
return is_constant_ccode_expression (ccast.inner);