Given
static void L(string s, DynamicApi api)
{
if (s.Equals("2"))
{
} else if (api != null)
{
api.M();
}
}
should be
static void L(string s, DynamicApi api)
{
if (s.Equals("2"))
{
} else
{
api?.M();
}
}
Current behaviour
static void L(string s, DynamicApi api)
{
if (s.Equals("2"))
{
} else api?.M();
}
Given
should be
Current behaviour