Question about the test Dont Suggest Completely Wrong Stuff
#10823
-
I'm confused by this test: https://github.com/dotnet/fsharp/blob/main/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DontSuggestTests.fs#L11 It seems to me that the test is actually proving that F# does suggest completely wrong stuff (i.e., Math instead of Path). I'm just double-checking. Shouldn't this test be re-written to fail if it suggests Math? How would we do that? And then fix the code to make it suggest System.IO.Path instead of Math? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Honestly I'm not sure why the test case exists. That's the best suggestion it can make at the time, so while it's technically right it's not really a good test to begin with. I'd be fine with removing it. |
Beta Was this translation helpful? Give feedback.
-
IIRC older versions of the suggestions feature suggested things like x, id,... Which are totally different. So when I fixed that, I added this case to not regress. But I don't think it's really necessary |
Beta Was this translation helpful? Give feedback.
IIRC older versions of the suggestions feature suggested things like x, id,... Which are totally different. So when I fixed that, I added this case to not regress. But I don't think it's really necessary