Fix InsStream

This commit is contained in:
Michael Bogdanov
2015-01-22 12:19:55 +03:00
parent ad746b7fb4
commit d5f19eaee4
@@ -31,11 +31,11 @@ val AbstractInsnNode.isMeaningful : Boolean get() =
class InsnStream(val from: AbstractInsnNode, val to: AbstractInsnNode?) : Stream<AbstractInsnNode> {
override fun iterator(): Iterator<AbstractInsnNode> {
return object : Iterator<AbstractInsnNode> {
var current = from
var current: AbstractInsnNode? = from
override fun next(): AbstractInsnNode {
val result = current
current = current.getNext()
return result
current = current!!.getNext()
return result!!
}
override fun hasNext() = current != to
}