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

void on_sig(int item) {
    debug("fired");
}

void main() {
    Generic<int> g = new Generic<int>();
    // comment out the next line to avoid compiler crash
    g.sig.connect(on_sig);
    g.fire(1);
}

