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 628639 - Passing abstract type as signal parameter causes compiler to crash
Passing abstract type as signal parameter causes compiler to crash
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator: GSignal
0.9.x
Other All
: Urgent critical
: ---
Assigned To: Vala maintainers
Vala maintainers
crash-on-valid-code test-case
Depends on:
Blocks:
 
 
Reported: 2010-09-02 20:19 UTC by Jim Nelson
Modified: 2011-02-08 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Minimal test case (339 bytes, text/x-vala)
2010-09-02 20:20 UTC, Jim Nelson
Details

Description Jim Nelson 2010-09-02 20:19:54 UTC
I'm using Vala 0.9.7.

I'm creating a generic class that has a signal.  That signal's sole parameter is of type 'G', the abstract type:

public class Generic<G> {
    public signal void sig(G item);
    
    public virtual void fire(G item) {
        sig(item);
    }
}

When I include in the code the line to connect to the signal, the compiler crashes with this assertion:

ERROR:valasemanticanalyzer.c:2953:vala_semantic_analyzer_get_actual_type: assertion failed: (instance_type != NULL)

I've attached a test case.
Comment 1 Jim Nelson 2010-09-02 20:20:19 UTC
Created attachment 169390 [details]
Minimal test case
Comment 2 Jürg Billeter 2011-02-08 21:11:03 UTC
commit 36999b5ffd63cc56a8648791b02bf07e7da88077
Author: Jürg Billeter <j@bitron.ch>
Date:   Tue Feb 8 22:08:03 2011 +0100

    Fix signals with generic parameters
    
    Fixes bug 628639.