Add generic extern collection types

This commit is contained in:
Sergey Chernov 2026-02-04 00:31:55 +03:00
parent 6539b9deff
commit 0f1748e053

View File

@ -22,6 +22,23 @@ extern class Iterator<T> {
fun toList(): List<T> fun toList(): List<T>
} }
extern class Collection<T> : Iterable<T> {
}
extern class Array<T> : Collection<T> {
}
extern class List<T> : Array<T> {
}
extern class Set<T> : Collection<T> {
}
extern class Map<K,V> {
}
extern class MapEntry<K,V>
// Built-in math helpers (implemented in host runtime). // Built-in math helpers (implemented in host runtime).
extern fun abs(x: Object): Real extern fun abs(x: Object): Real
extern fun ln(x: Object): Real extern fun ln(x: Object): Real