tunnelvisionlabs / ReferenceAssemblyAnnotator

IL weaver to add nullability annotations to .NET reference assemblies
MIT License
71 stars 8 forks source link

Consider polyfilling System.Type.op_Equality if it doesn't exist so that C# 9 records can be used on net35 #87

Closed jnm2 closed 3 years ago

jnm2 commented 3 years ago

@sharwell This one seems really easy to implement, and using ReferenceAssemblyAnnotator together with a second reference assembly rewriter sounds like pain. Can ReferenceAssemblyAnnotator find it in its heart to broaden its scope and accept a contribution for this?

jnm2 commented 3 years ago

Not sure what I was thinking; it couldn't work, because the impl would have to exist at runtime.

sharwell commented 3 years ago

You could try to get the compiler to fall back to object.Equals(object, object)...

jnm2 commented 3 years ago

@sharwell I would put a lot of money on them turning this down, based on similar issues I've opened having to do with C# 8 features on .NET Framework.

jnm2 commented 3 years ago

Fred confirmed my expectations at https://discord.com/channels/732297728826277939/732297994699014164/784527963462959104.