making progress on porting kotlin/dom to JS; added AbstractList and RuntimeException/UnsupportedOperationException support to the kotlin-lib.js and fixed up a gremlin (Iterator is a trait not a class)

This commit is contained in:
James Strachan
2012-05-29 12:33:34 +01:00
parent d759d50811
commit 35aa899cb1
4 changed files with 216 additions and 151 deletions
+9 -1
View File
@@ -16,7 +16,7 @@ public fun comparator<T>(f : (T, T) -> Int) : Comparator<T> = js.noImpl
library
public open class Iterator<T>() {
public trait Iterator<T> {
open fun next() : T = js.noImpl
open fun hasNext() : Boolean = js.noImpl
open fun remove() : Unit = js.noImpl
@@ -67,6 +67,14 @@ public trait Collection<erased E> : java.lang.Iterable<E> {
open fun clear() : Unit
}
library
public abstract open class AbstractCollection<erased E> : Collection<E> {
}
library
public abstract open class AbstractList<erased E> : AbstractCollection<E>, List<E> {
}
library
public trait List<erased E> : Collection<E> {
override fun size() : Int