elena-lang
elena-lang copied to clipboard
Dispatch handle : dispatching to an expression
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