consider follow simple class
public class SomeType
{
public static int Fn(dynamic arg) { return 1; }
}
and the follow statement
dynamic value = 10;
var a = SomeType.Fn(null);
var b = SomeType.Fn(value);
the type of a is correct ( int )
the type of b is wrong ( dynamic )
I can't use intellisense any more on b until I do a dummy recast (int)SomeType.Fn(value) for what was already prototype to return an integer.
the question is, why the dynamic in the argument makes the intellisense to change my function prototype signature ?
even if I insert a dynamic into a function, that function cannot return nothing else than what is declared in its prototype, is this a bug ?
current workaround for me is the following
var b = SomeType.Fn((object)value);