There is no ambiguity. As you said in the comments yourself, the signature is different. Inside of the context of ConnectionConnect
, there is now a
Strategy(int i)
and a
Strategy(params object[] parameters)
which is inherited from the FunctionStrategyBase
which is perfectly acceptable overloading. Regardless of what happens at runtime and the odd behaviour that could occur if you were unaware of the mechanics of these functions, the compiler sees no strict problems with this.
When calling at runtime, the program will use the closest matching signature, before checking for signatures that it can make valid implicit casts to. If you pass a single int to Strategy
, the Strategy(int i)
method will be used. If you did not have this, it would then implicitly box your int and pass it to Strategy(params object[] parameters)
as a feature of the language.