using Gee;

class Cell : Object
{
}

class Container<T> : Object
{
    public ArrayList<T> arr = new ArrayList<T>();
    public Container()
    {
        // Init in the constructor fixes this
        //arr = new ArrayList<T>();
    }
}

public class Main
{
    public static int main (string[] args)
    {
        Container<Cell> cont = new Container<Cell>();
        cont.arr.add(new Cell());
        Cell x = cont.arr.get(0); // Causes warning:
        //GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
        return 0;
    }
}