Compilation error

I have this zep code:

    protected static function makeDi() -> <DiInterface>
    {
        var di;

        let di = <DiInterface> new Di\FactoryDefault();

        return di;
    }

but I can't compile it. The compiler throws an errors like

.../file.zep.c:441:2: error: passing 'zval' (aka 'struct _zval_struct') to parameter of incompatible type 'zval *' (aka 'struct _zval_struct *'); take the address with &
        object_init_ex(_0, phalcon_di_factorydefault_ce);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../file.zep.c:442:2: error: indirection requires pointer operand ('zval' (aka 'struct _zval_struct') invalid)
        ZEPHIR_CALL_METHOD(NULL, _0, "__construct", NULL);
        ^                        ~~

and so on. In .c file I have:

PHP_METHOD(Project_Class, makeDi) {

    int ZEPHIR_LAST_CALL_STATUS;
    zval *di = NULL, _0;

    ZEPHIR_MM_GROW();

    ZEPHIR_SINIT_VAR(_0);
    object_init_ex(_0, phalcon_di_factorydefault_ce); // 441
    ZEPHIR_CALL_METHOD(NULL, _0, "__construct", NULL); // 442
    zephir_check_call_status();
    ZEPHIR_CPY_WRT(di, _0);
    RETURN_CCTOR(di);

}

What I do wrong? Zephir version 0.5.8a



1.9k

Could you please report this as a bug?

Issue is fixed?