-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[generator] Fix an issue with regards to attributes from inlined prot…
…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.
- Loading branch information
1 parent
49c3fd4
commit b1957c9
Showing
6 changed files
with
143 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
tests/generator/tests/attributes-from-inlined-protocols.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
|
||
using Foundation; | ||
using ObjCRuntime; | ||
|
||
namespace NS { | ||
[NoTV] | ||
[BaseType (typeof (NSObject))] | ||
interface TypeA : ProtocolA { | ||
} | ||
|
||
[Introduced (PlatformName.iOS, 11, 0)] | ||
[Introduced (PlatformName.TvOS, 11, 0)] | ||
[Protocol] | ||
interface ProtocolA { | ||
[Introduced (PlatformName.iOS, 12, 0)] | ||
[Introduced (PlatformName.TvOS, 12, 0)] | ||
[Export ("someMethod1:")] | ||
void SomeMethod1 (nint row); | ||
|
||
[Introduced (PlatformName.iOS, 12, 0)] | ||
[Export ("someMethod2:")] | ||
void SomeMethod2 (nint row); | ||
|
||
[Introduced (PlatformName.TvOS, 12, 0)] | ||
[Export ("someMethod3:")] | ||
void SomeMethod3 (nint row); | ||
|
||
[Export ("someMethod4:")] | ||
void SomeMethod4 (nint row); | ||
} | ||
} |
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.