ELENA-LANG / elena-lang

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
https://elena-lang.github.io/
MIT License
227 stars 23 forks source link

Support variadic argument with a single item #621

Closed arakov closed 3 months ago

arakov commented 9 months ago

Describe the bug A variadic method handler should be called if there are normal method with the same name

To Reproduce

public class A
{
   static Test(params string[] args)
   {
      console.writeLine("params:string");
   }

   static Test(string[] args)
   {
      console.writeLine("string[]");
   }
}

public program()
{
   var a := A;

   a.Test("abc");
}

Expected behavior The correct method has to be called.

Please complete the following information:

Additional context Add any other context about the problem here.

arakov commented 3 months ago

Already fixed