Using `TailCall` diagnostic attribute on non tailcall rec function does not generate warning on Visual Studio Error List pane
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
Please provide a succinct description of the issue.
**Repro steps**
Steps required to reproduce the problem:
1. Use this code on any .fs file and compile it:
```
[]
let rec private sumListTailRecHelperWithTailcallDiagnostic accumulator xs =
match xs with
| [] -> accumulator
| y::ys -> sumListTailRecHelper (accumulator+y) ys
/// This example computes the sum of a list of integers using recursion.
[]
let rec sumList xs =
match xs with
| [] -> 0
| y::ys -> y + sumList ys
```
2. Watch the output pane for Build and the Error List pane.
Is this intentional? As usually compiler warning is also always shown on Error List pane.
**Expected behavior**
Both Error List pane and the Output pane of Build should show the warning of using TailCall attribute on non tailcall rec function.
**Actual behavior**
Only Built output show compiler warning, whereas the Error List do not show the warning:

**Known workarounds**
As far as I know, none. I have tried to clear the compiler output folder, and compile again using clean rebuild.
**Related information**
Provide any related information (optional):
* Operating system: Windows 11 23H2
* .NET Runtime kind (.NET Core, .NET Framework, Mono): .NET 8.0
* Editing Tools (e.g. Visual Studio Version, Visual Studio): VS 2022 v17.8.1 (also reproducible on 17.8.3)
Contributor guide
Assessment
This issue has not been assessed yet.