- One of the MethodDefinitions is never added to the type
- References to such method are incorrectly pointing to the the wrong one.
- The problem happens when we register the variable used in the generated code to store the reference to the MethodDefinition. For some reason, the parameter types does not include the information that they are nullable
Snippet to reproduce the issue (note in the generated code that there are to MethodDefinitions for M(object?):
class Foo
{
void M2() { M(this); }
void M(object? o) {}
}