elena-lang icon indicating copy to clipboard operation
elena-lang copied to clipboard

Dispatch handle : dispatching to an expression

Open arakov opened this issue 4 years ago • 0 comments

Describe the bug A dispatch handler ignores the target expression (as it was only an object without any operation).

To Reproduce

import extensions;

singleton FieldExtender
{
    Field = new
    {
        foo()
        {
            console.printLine("extended foo")
        }
    };    
}

A
{
    extender := FieldExtender;
    
    dispatch() => extender.Field;
}

public program()
{
    var a := new A();
    
    a.foo();
}

Expected behavior A foo method should be correctly invoked

arakov avatar Sep 11 '20 08:09 arakov