Commit 99127a7
committed
Add opt-in support for NSEnum generation for enum classes for Kotlin Native iOS via an annotation
Addresses KT-48068
If not specified otherwise via @ObjCEnum, the NSEnum type name will match the Kotlin Enum
ObjC / Swift name with "NSEnum" appended.
The new type is accesible via the "nsEnum" property (the same way as the ordinal value via "ordinal")1 parent 5952e77 commit 99127a7
File tree
40 files changed
+816
-57
lines changed- analysis/low-level-api-fir/testData/lazyResolveStdlibSources
- kotlin-native
- backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan
- llvm/objcexport
- objcexport
- runtime/src/main/kotlin/kotlin/native
- libraries
- stdlib/src/kotlin
- annotations
- experimental
- tools/binary-compatibility-validator
- klib-public-api
- reference-public-api
- native
- base/src/main/kotlin/org/jetbrains/kotlin/backend/konan
- native.tests/testData/framework/objcexport
- objcexport-header-generator
- impl
- analysis-api
- src/org/jetbrains/kotlin/objcexport
- analysisApiUtils
- test/org/jetbrains/kotlin/objcexport/tests
- mangling
- k1/src/org/jetbrains/kotlin/backend/konan/objcexport
- src/org/jetbrains/kotlin/backend/konan/objcexport
- testData/headers
- enumClassWithNamedObjCEnum
- enumClassWithObjCEnumAndRenamedLiterals
- enumClassWithObjCEnum
- test/org/jetbrains/kotlin/backend/konan/tests
40 files changed
+816
-57
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
827 | | - | |
| 827 | + | |
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1375 | 1375 | | |
1376 | 1376 | | |
1377 | 1377 | | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1378 | 1387 | | |
1379 | 1388 | | |
1380 | 1389 | | |
| |||
1430 | 1439 | | |
1431 | 1440 | | |
1432 | 1441 | | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
1433 | 1445 | | |
1434 | 1446 | | |
1435 | 1447 | | |
| |||
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
| 172 | + | |
163 | 173 | | |
164 | 174 | | |
165 | 175 | | |
| |||
170 | 180 | | |
171 | 181 | | |
172 | 182 | | |
| 183 | + | |
173 | 184 | | |
174 | 185 | | |
175 | 186 | | |
| |||
224 | 235 | | |
225 | 236 | | |
226 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
227 | 249 | | |
228 | 250 | | |
229 | 251 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
119 | 133 | | |
120 | 134 | | |
121 | 135 | | |
| |||
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
74 | 91 | | |
75 | 92 | | |
76 | 93 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
9847 | 9851 | | |
9848 | 9852 | | |
9849 | 9853 | | |
| 9854 | + | |
| 9855 | + | |
| 9856 | + | |
| 9857 | + | |
| 9858 | + | |
| 9859 | + | |
| 9860 | + | |
| 9861 | + | |
| 9862 | + | |
| 9863 | + | |
9850 | 9864 | | |
9851 | 9865 | | |
9852 | 9866 | | |
| |||
13769 | 13783 | | |
13770 | 13784 | | |
13771 | 13785 | | |
| 13786 | + | |
| 13787 | + | |
| 13788 | + | |
| 13789 | + | |
| 13790 | + | |
| 13791 | + | |
| 13792 | + | |
| 13793 | + | |
| 13794 | + | |
| 13795 | + | |
13772 | 13796 | | |
13773 | 13797 | | |
13774 | 13798 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3264 | 3264 | | |
3265 | 3265 | | |
3266 | 3266 | | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
3267 | 3270 | | |
3268 | 3271 | | |
3269 | 3272 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments