mwerschy
mwerschy

Reputation: 1708

Reduce on Range throws NoClassDefFoundError: kotlin/IntIterator

Test:

fun main(args: Array<String>) {
    val total = (0..10).reduce { total, next -> total + next }
}

Stacktrace:

Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/IntIterator
    at TestReduceKt.main(TestReduce.kt:6)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.ClassNotFoundException: kotlin.IntIterator
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 6 more

Upvotes: 4

Views: 189

Answers (1)

yole
yole

Reputation: 97138

This is a bug in Kotlin 1.0. It will be fixed in Kotlin 1.0.1.

Upvotes: 4

Related Questions