Merge branch 'master' of github.com:JetBrains/kotlin

This commit is contained in:
James Strachan
2012-05-04 15:08:12 +01:00
385 changed files with 5982 additions and 2208 deletions
+2 -2
View File
@@ -22,8 +22,8 @@
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<testSourceDirectory>${project.basedir}/test</testSourceDirectory>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<plugins>
<plugin>
+3 -3
View File
@@ -54,7 +54,7 @@ public inline fun <T> comparator(vararg functions: Function1<T,Any?>): Comparato
private class FunctionComparator<T>(val functions: Array<Function1<T,Any?>>): Comparator<T> {
public fun toString(): String {
public override fun toString(): String {
return "FunctionComparator${functions.toList()}"
}
@@ -75,7 +75,7 @@ public inline fun <T> comparator(fn: (T,T) -> Int): Comparator<T> {
}
private class Function2Comparator<T>(val compareFn: (T,T) -> Int): Comparator<T> {
public fun toString(): String {
public override fun toString(): String {
return "Function2Comparator${compareFn}"
}
@@ -89,4 +89,4 @@ private class Function2Comparator<T>(val compareFn: (T,T) -> Int): Comparator<T
public override fun equals(obj: Any?): Boolean {
return this == obj
}
}
}
+2 -1
View File
@@ -320,7 +320,8 @@ class CollectionTest {
assertEquals(0, ArrayList<Double>().count())
}
test fun last() {
//todo after KT-1873 the name might be returned to 'last'
test fun lastElement() {
val data = arrayList("foo", "bar")
assertEquals("bar", data.last())
assertEquals(25, arrayList(15, 19, 20, 25).last())