]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Use the one available source_reference for internal error
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 9 Mar 2021 06:59:25 +0000 (07:59 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 9 Mar 2021 06:59:25 +0000 (07:59 +0100)
This will at least provide some pointer to where things are going wrong.

In addition to 837d593e00d1a3ca8a6f2d13fb1514bed7672965

See https://gitlab.gnome.org/GNOME/vala/issues/436

codegen/valaccodearraymodule.vala

index b9352ce7356aace0cc30c6e9ffee2ee395a0f713..8eb995f20fd40083f54f0d316e49dbba2c09f638 100644 (file)
@@ -148,7 +148,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
 
                List<CCodeExpression> size = ((GLibValue) value).array_length_cvalues;
                if (size == null || size.size < dim) {
-                       Report.error (null, "internal error: invalid array_length for given dimension");
+                       Report.error (array_type.source_reference, "internal: invalid array_length for given dimension");
                        return new CCodeInvalidExpression ();
                }
                return size[dim - 1];