Bug description
VSTHRD012 gets reported if there is a private overload of a method with a JTF parameter.
Repro steps
static class Extensions
{
public static void OnMainThread(Action action) => OnMainThread(Factory, action);
private static void OnMainThread(JoinableTaskFactory factory, Action action) => factory.Run(async delegate
{
await Factory.SwitchToMainThreadAsync();
action();
});
}
From anywhere else:
Extensions.OnMainThread(() => { }) // <- this will report VSTHRD012
Expected behavior
No VSTRHD012 reported
Actual behavior
VSTHRD012 gets reported.
Additional context
Changing the name of the private method to something other than the name of the public method fixes VSTHRD012
Bug description
VSTHRD012 gets reported if there is a private overload of a method with a JTF parameter.
Repro steps
From anywhere else:
Expected behavior
No VSTRHD012 reported
Actual behavior
VSTHRD012 gets reported.
Additional context
Changing the name of the private method to something other than the name of the public method fixes VSTHRD012