Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributes from inlined protocol members are copied even if the target type is not available on the given platform #17268

Closed
rolfbjarne opened this issue Jan 17, 2023 · 0 comments · Fixed by #17269
Labels
generator Issues affecting the generator
Milestone

Comments

@rolfbjarne
Copy link
Member

In the following scenario:

  • Type T is not available on a platform (say tvOS).
  • Protocol P is available on said platform.
  • A member M of P has its own availability attribute for said platform (for
    instance if P is available on tvOS 11.0, and the member is available on tvOS
    12.0).
  • The protocol P is inlined into the type T.

We include the SupportedOSPlatform attribute from the inlined member on
generated code on other platforms (so the iOS assembly would say that the
inlined member M in T is available on tvOS).

@rolfbjarne rolfbjarne added the generator Issues affecting the generator label Jan 17, 2023
@rolfbjarne rolfbjarne added this to the .NET 8 milestone Jan 17, 2023
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Jan 17, 2023
…ocols. Fixes xamarin#17268.

In the following scenario:

* Type T is not available on a platform (say tvOS).
* Protocol P is available on said platform.
* A member M of P has its own availability attribute for said platform (for
  instance if P is available on tvOS 11.0, and the member is available on tvOS
  12.0).
* The protocol P is inlined into the type T.

We'd include the SupportedOSPlatform attribute from the inlined member on
generated code on other platforms (so the iOS assembly would say that the
inlined member M in T is available on tvOS).

Fixes xamarin#17268.
rolfbjarne added a commit that referenced this issue Jan 18, 2023
…ocols. Fixes #17268. (#17269)

In the following scenario:

* Type T is not available on a platform (say tvOS).
* Protocol P is available on said platform.
* A member M of P has its own availability attribute for said platform (for
  instance if P is available on tvOS 11.0, and the member is available on tvOS
  12.0).
* The protocol P is inlined into the type T.

We'd include the SupportedOSPlatform attribute from the inlined member on
generated code on other platforms (so the iOS assembly would say that the
inlined member M in T is available on tvOS).

Fixes #17268.
dustin-wojciechowski pushed a commit to dustin-wojciechowski/xamarin-macios that referenced this issue Jan 19, 2023
…ocols. Fixes xamarin#17268. (xamarin#17269)

In the following scenario:

* Type T is not available on a platform (say tvOS).
* Protocol P is available on said platform.
* A member M of P has its own availability attribute for said platform (for
  instance if P is available on tvOS 11.0, and the member is available on tvOS
  12.0).
* The protocol P is inlined into the type T.

We'd include the SupportedOSPlatform attribute from the inlined member on
generated code on other platforms (so the iOS assembly would say that the
inlined member M in T is available on tvOS).

Fixes xamarin#17268.
@ghost ghost locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
generator Issues affecting the generator
Projects
None yet
1 participant