mirror of
https://github.com/apple/pkl.git
synced 2026-06-25 06:46:18 +02:00
Enforce that abstract members are implemented
This adds a check that abstract members must be implemented. If any members lack an implementation, an error is thrown describing the missing members. Also: we have a bug in `pkl:base`; class `Set` does not implement all members of class `Collection`.
This commit is contained in:
@@ -3562,6 +3562,18 @@ external class Set<out Element> extends Collection<Element> {
|
||||
|
||||
/// The difference of this set and [other].
|
||||
external function difference(other: Set): Set<Element>
|
||||
|
||||
function indexOf(_): Int = throw("Set does not implement `indexOf`")
|
||||
function indexOfOrNull(_): Int? = throw("Set does not implement `indexOfOrNull`")
|
||||
|
||||
function lastIndexOf(_): Int = throw("Set does not implement `lastIndexOf`")
|
||||
function lastIndexOfOrNull(_): Int? = throw("Set does not implement `lastIndexOfOrNull`")
|
||||
|
||||
function findIndex(_): Int = throw("Set does not implement `findIndex`")
|
||||
function findIndexOrNull(_): Int? = throw("Set does not implement `findIndexOrNull`")
|
||||
|
||||
function findLastIndex(_): Int = throw("Set does not implement `findLastIndex`")
|
||||
function findLastIndexOrNull(_): Int? = throw("Set does not implement `findLastIndexOrNull`")
|
||||
}
|
||||
|
||||
/// Creates a map containing the given alternating [keysAndValues].
|
||||
|
||||
Reference in New Issue
Block a user