Add support for variadic function types and ellipsis in type declarations, stricter lamda types compile-time checks and object binding for Kotlin bridges

This commit is contained in:
sergeych committed 2026-02-19 11:12:39 +03:00
1 parent e7c1adb2c5
commit d82302dd01
15 files changed
+387 -12

No files matched your search

+5
View File
@@ -34,6 +34,11 @@ Valid examples:
Ellipsis are used to declare variadic arguments. It basically means "all the arguments available here". It means, ellipsis argument could be in any part of the list, being, end or middle, but there could be only one ellipsis argument and it must not have default value, its default value is always `[]`, en empty list.
Ellipsis can also appear in **function types** to denote a variadic position:
var f: (Int, Object..., String)->Real
var anyArgs: (...)->Int // shorthand for (Object...)->Int
Ellipsis argument receives what is left from arguments after processing regular one that could be before or after.
Ellipsis could be a first argument: