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
Diagnostic ID: CA1416: This call site is reachable on: 'macOS/OSX' 15.0 and later, 'tvos' 12.2 and later. 'Other.DoSomething()' is only supported on: 'tvos' 15.0 and later.
warning CA1416: This call site is reachable on: 'macOS/OSX' 15.0 and later, 'tvos' 12.2 and later. 'C.DoSomething()' is only supported on: 'tvos' 15.0 and later. (
Which is incorrect, because the call site is not reachable on tvos12.2 or later (due to the SupportedOSPlatformGuard attribute on IsAtLeast).
Removing either of the macos or tvos availability attributes on all members fixes the warning.
Expected behavior
No warning.
Actual behavior
warning CA1416: This call site is reachable on: 'macOS/OSX' 15.0 and later, 'tvos' 12.2 and later. 'C.DoSomething()' is only supported on: 'tvos' 15.0 and later. (
Additional context
The text was updated successfully, but these errors were encountered:
Analyzer
Diagnostic ID: CA1416:
This call site is reachable on: 'macOS/OSX' 15.0 and later, 'tvos' 12.2 and later. 'Other.DoSomething()' is only supported on: 'tvos' 15.0 and later.
Analyzer source
SDK: Built-in CA analyzers in .NET 5 SDK or later
Version: SDK 9.0.100
Describe the bug
Incorrect CA1416 is reported when there are more than one
SupportedOSPlatformGuard
on a member.Steps To Reproduce
Test project:
allplatformlib-ea082d2.zip
Binlog:
msbuild.binlog.zip
This is the code:
This reports:
Which is incorrect, because the call site is not reachable on tvos12.2 or later (due to the SupportedOSPlatformGuard attribute on
IsAtLeast
).Removing either of the
macos
ortvos
availability attributes on all members fixes the warning.Expected behavior
No warning.
Actual behavior
Additional context
The text was updated successfully, but these errors were encountered: