Create from usage: Fixed case for multi-declaration in a for-loop.

This commit is contained in:
Jack Zhou
2013-05-02 13:35:43 -04:00
parent e0a7e85e4a
commit 5bd144313d
9 changed files with 117 additions and 17 deletions
@@ -0,0 +1,21 @@
// "Create function 'next' from usage" "true"
class FooIterator<T> {
fun hasNext(): Boolean { return false }
fun next(): Any {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
class Foo<T> {
fun iterator(): FooIterator<String> {
throw UnsupportedOperationException("not implemented")
}
}
fun Any.component1(): Int {
return 0
}
fun Any.component2(): Int {
return 0
}
fun foo() {
for ((i: Int, j: Int) in Foo<Int>()) { }
}