Commit b6c1539
[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.1 parent d6024f1 commit b6c1539
File tree
4 files changed
+26
-0
lines changed- src/Xamarin.Android.Tools.Bytecode/Kotlin
- tests/Xamarin.Android.Tools.Bytecode-Tests
- kotlin
4 files changed
+26
-0
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
26 | 41 | | |
27 | 42 | | |
28 | 43 | | |
| |||
Binary file not shown.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments