[ObjCExport] Implement initial sorting and ordering for ObjC translation

^KT-65237
This commit is contained in:
Sebastian Sellmair
2024-02-01 14:29:58 +01:00
committed by Space Team
parent 27fa3ebfb3
commit 32da1b70f5
14 changed files with 307 additions and 13 deletions
@@ -0,0 +1,22 @@
class Foo {
/* Number of parameters increases, relevant for ordering */
fun a() = Unit
fun a(p0: Int) = Unit
fun a(p0: Int, p1: Int) = Unit
/* Should be ordered a, b, c, but is explicitly placed as a, c, b in source code */
fun c() = Unit
/* Number of parameters decreases, should be orderd in increasing number */
fun b(p0: Int, p1: Int) = Unit
fun b(p0: Int) = Unit
fun b() = Unit
/* Short get sorted in alphabetical order */
val pA = 42
val pC = 42
val pB = 42
/* Functions should be prioritised over properties */
fun d() = 42
}