You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Don't warn FS3559 when obj is inferred if the obj is expected there #16454
Area-Diagnosticsmistakes and possible improvements to diagnosticsBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.help wanted
The new FS3559 triggers where I think it should not. Consider this:
letfoo(x:obj)=()
foo null
It triggers on null:
A type has been implicitly inferred as 'obj', which may be unintended. Consider adding explicit type annotations. You can disable this warning by using '#nowarn "3559"' or '--nowarn:3559'.
But the type of the argument is explicitly obj, so it doesn't make sense that it should trigger here.
Yeah, a verbatim null is one of the most annoying cases. I tried to fix this and could not :( which is not to say it's impossible, but the required information did not appear to be present locally at the point where the warning is generated.
(The second most annoying case is typeof<Foo<_>>, where the _ is inferred as obj.)
Tried to have another look just now, but I'm back to my usual state of being unable to build the compiler.
Area-Diagnosticsmistakes and possible improvements to diagnosticsBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.help wanted
Activity
Smaug123 commentedon Dec 22, 2023
Yeah, a verbatim
nullis one of the most annoying cases. I tried to fix this and could not :( which is not to say it's impossible, but the required information did not appear to be present locally at the point where the warning is generated.(The second most annoying case is
typeof<Foo<_>>, where the_is inferred asobj.)Tried to have another look just now, but I'm back to my usual state of being unable to build the compiler.