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 602208 - Uninitialized array length in concatenated method calls
Uninitialized array length in concatenated method calls
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Arrays
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
: 609440 619399 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-11-17 16:00 UTC by Michael 'Mickey' Lauer
Modified: 2010-10-13 22:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael 'Mickey' Lauer 2009-11-17 16:00:38 UTC
void main()
{
        var str1 = "foo:bar:baz".split( ":" );
        assert( str1.length == 3 );

        assert( "foo:bar:baz".split( ":" ).length == 3 );
}

====================================================
mickey@opal:/tmp$ ./length 
**
ERROR:/tmp/length.vala.c:31:_main: assertion failed: (_vala_array_length (_tmp2_) == 3)
Aborted
Comment 1 Jürg Billeter 2010-03-26 19:16:26 UTC
*** Bug 609440 has been marked as a duplicate of this bug. ***
Comment 2 Evan Nemerson 2010-05-23 00:34:50 UTC
*** Bug 619399 has been marked as a duplicate of this bug. ***
Comment 3 Jürg Billeter 2010-10-13 22:20:44 UTC
commit fe07e1d0857b9c428c182f1cba06bf81c3323d67
Author: Jürg Billeter <j@bitron.ch>
Date:   Thu Oct 14 00:13:47 2010 +0200

    codegen: Fix use of uninitialized temporary variables
    
    Fixes bug 602208.