ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces
Describe the bug
The following code raises a warning :
warning 407: Message 'new' does not handled by the object
In reality the code fails:
sandbox'$private'B#class : Method new[1] not found
Call stack:
sandbox'program.function:#invoke:sandbox.l(24)
system'$private'entry.function:#invoke:app.l(28)
system'$private'entrySymbol#sym:app.l(79)
Aborted:ffffffff
To Reproduce
class B
{
protected constructor new()
{
console.writeLine("new B")
}
}
class C : B
{
_arg1;
constructor(arg1)
<= super new()
{
_arg1 := arg1
}
}
public program()
{
var c := new C("arg")
}
Expected behavior
An error must be raised. A named constructor cannot be called from the implicit one
After reviewing the code, the following changes were made:
only redirecting to named constructor from default implicit constructor is not allowed. In this case the operation must be allowed, because it is a conversion constructor
Describe the bug The following code raises a warning :
In reality the code fails:
To Reproduce
Expected behavior An error must be raised. A named constructor cannot be called from the implicit one