After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 548429 - Various problems with string[][]: assignments
Various problems with string[][]: assignments
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Arrays
0.3.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-19 12:15 UTC by Philip Van Hoof
Modified: 2010-10-16 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Van Hoof 2008-08-19 12:15:55 UTC
$ valac test.vala 
test.vala:4.21-4.23: error: internal error: duplicating string[][] instances not yet supported
		string [][] def = abc;
		                  ^^^
Compilation failed: 1 error(s), 0 warning(s)

$ cat test.vala 
public class test {
	public static void main () {
		string [][] abc = new string [1][2];
		string [][] def = abc;
	}
}
$
Comment 1 Andreas Brauchli 2009-01-16 15:56:39 UTC
multidimensional arrays are declared differently than in C.. maybe the parser should warn about this usage..

this works fine:

public class test {
    public static void main () {
        string [,] abc = new string [1,2];
        string [,] def = abc;
    }
}
Comment 2 Michael 'Mickey' Lauer 2009-10-08 12:04:58 UTC
Meanwhile, the situation got worse with regards to the original issue. Vala no longer emits an error, but CRITICALs:

** (valac:13608): CRITICAL **: vala_ccode_array_module_real_get_array_length_cexpression: assertion `array_expr != NULL' failed

** (valac:13608): CRITICAL **: vala_ccode_function_call_add_argument: assertion `expr != NULL' failed
Compilation succeeded - 1 warning(s)
Comment 3 Jürg Billeter 2010-10-16 13:38:24 UTC
commit cc435dd6ec069b87e986fa454e80e5fe80a0df72
Author: Jürg Billeter <j@bitron.ch>
Date:   Sat Oct 16 15:17:23 2010 +0200

    Report error when trying to use stacked arrays
    
    Stacked array support was never completed. Report an error instead of
    generating incorrect C code.
    
    Fixes bug 546603, bug 548428, bug 548429, bug 565865, bug 565872,
    bug 571322, bug 572649, and bug 576611.