Create from usage: Added tests.

This commit is contained in:
Jack Zhou
2013-04-21 18:31:06 -04:00
parent 60fa732042
commit b7fe134b61
53 changed files with 691 additions and 5 deletions
@@ -0,0 +1,15 @@
// "Create method 'next' from usage" "true"
class FooIterator<T> {
fun hasNext(): Boolean { return false }
fun next(): T {
throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates.
}
}
class Foo<T> {
fun iterator(): FooIterator<T> {
throw Exception("not implemented")
}
}
fun foo() {
for (i: Int in Foo<Int>()) { }
}