Repository navigation
Description
It seems like some warnings are missing from all recent IDEs (Rider, Visual Studio 2017, Ionide and FSI)
Repro steps
The following code contains a warning, as the generic parameter 'a is constrained to string because of the parameter f in cache.GetOrAdd(_, f):
let internal memoizeBy (getKey : 'a -> string) (f: 'a -> 'b) : 'a -> 'b =
let cache = System.Collections.Concurrent.ConcurrentDictionary<string, 'b>()
fun (x: 'a) ->
cache.GetOrAdd(getKey x, f)
Use this code snippet in recent Visual Studio, Ionide or Rider.
Expected behavior
Actual behavior
No Warning at all.
Known workarounds
Use older versions
Related information
There have been reports on Slack that other warnings seem to be no longer shown (like "use new on IDisposable), but I haven't actually verified anything.
If the impact of this are indeed ALL warnings, the severity should be considered very high.
Even if the impact is only for a particular subset of warnings I think the severity should still be considered high as missing this warning along can (an has already) cost a lot of hours and frustration.
While the above (striked through) is true, we have lived with this a long time. So I think it is serious but nobody noticed this for a long time (it is indeed hard to spot) ...
Also this seems to be a regression as it worked previously.
@Lleutch Did some testing and says this has been introduced "between FCS 9.0.1 and FCS 10.0.3"

Activity
vasily-kirichenko commentedon Oct 14, 2017
I can reproduce it: no warnings for this specific function in latest VS 2017 and Rider: neither in the compiler output nor in the IDE. However, there is a warning for this simpler function:
vasily-kirichenko commentedon Oct 14, 2017
I can reproduce it on a ~10 months old revision (a7245c3), so it's not a very recent regression.
Lleutch commentedon Oct 14, 2017
I am adding that repo here :
https://github.com/Lleutch/VFT-3752
It is regarding the different versions of FCS returning or not the expected warnings.
matthid commentedon Mar 9, 2018
@dsyme is it not considered a regression anymore?
dsyme commentedon Mar 10, 2018
Yes, this is a regression - or at least the warning should be shown. I don't know why I changed the label
forward warnings when searching for a method overload, fixes dotnet#3752
matthid commentedon Mar 10, 2018
So after fixing this it seems like the compiler has thrown all warnings away while doing overload resolution. This would explain @vasily-kirichenko's finding, and that other warnings might be missing as well.
dsyme commentedon Mar 12, 2018
@matthid Super, thanks for looking into this
forward warnings when searching for a method overload (#4481)
forward warnings when searching for a method overload (#4481)