Skip to content

[Platform Compatibility Analyzer] Nested APIs shouldn't be allowed to expand the platform set #43971

@terrajobst

Description

@terrajobst

Repro

[SupportedOSPlatform("ios")]
class Some
{    
    [SupportedOSPlatform("windows")]
    public static void Api() {}
}

Expected

'Api' cannot widen the set of supported platforms of its containing symbol Some.

Work Items

Each of these should produce separate diagnostic ids:

  • Inconsistent List section of the Advanced Scenarios of Combining Attributes, when conflicting attributes are applied at the same level
  • Nested APIs shouldn't be allowed to expand the platform set and version support

Metadata

Metadata

Labels

api-approvedAPI was approved in API review, it can be implementedarea-Metacode-analyzerMarks an issue that suggests a Roslyn analyzercode-fixerMarks an issue that suggests a Roslyn code fixer

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions