-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[XAT.Bytecode] Bind Kotlin internal interfaces as package-private (#645)
Context: dotnet/android#4661 In 439bd83, we made a change to hide Kotlin `internal` members as we shouldn't be binding them. However a `public class` can inherit from an `internal interface`, so we need to emit those interfaces. Instead, emit `internal interface` types as "package private" types; `visibility=""` in `api.xml` parlance. This allows us to resolve the `interface` and thus successfully bind the `class`. In C#-land, the `interface` is not actually bound and the C# class doesn't actually implement it. This has no effect to the public API end user, who shouldn't be seeing the `internal interface` anyways. If a user really wants to publicly expose the `interface`, its `visibility` can be changed via `metadata`. ***Note***: Changing the `visibility` of a type may result in subsequent Java Callable Wrapper generation errors, if/when a Java Callable Wrapper attempts to implement the package-private type.
- Loading branch information
Showing
4 changed files
with
26 additions
and
0 deletions.
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
Binary file added
BIN
+318 Bytes
tests/Xamarin.Android.Tools.Bytecode-Tests/kotlin/InternalInterface.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
tests/Xamarin.Android.Tools.Bytecode-Tests/kotlin/InternalInterface.kt
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 @@ | ||
internal interface InternalInterface |