allow comments to include source code from test methods to demonstrate an API in action in code thats actually tested to be accurate. #KT-1458 Fixed

This commit is contained in:
James Strachan
2012-03-27 10:46:08 +01:00
parent 669126d635
commit 7dd8bc9911
2 changed files with 128 additions and 5 deletions
+5 -1
View File
@@ -2,7 +2,11 @@ package kotlin
import java.util.*
/** Returns true if any elements in the collection match the given predicate */
/**
* Returns true if any elements in the collection match the given predicate
*
* @includeFunction ../test/CollectionTest.kt any
*/
inline fun <T> java.lang.Iterable<T>.any(predicate: (T)-> Boolean) : Boolean {
for (elem in this) {
if (predicate(elem)) {