FascinatedBox / lily

Interpreted language focused on expressiveness and type safety.

Home Page:http://lily-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A class method that claims to return 'self' does not actually work

FascinatedBox opened this issue · comments

Quoting lily_emitter.c:

        if (type == lily_unit_type ||
            type == lily_self_class->self_type)
            lily_u16_write_2(emit->code, o_return_unit, line_num);

Attempting to use functions that return self in a chain will crash, because Unit is being returned instead.