Tests, messages and infra for deprecated symbol reporting

This commit is contained in:
Ilya Ryzhenkov
2015-03-16 23:04:37 +03:00
parent c8920b8158
commit 288e1baa87
55 changed files with 773 additions and 83 deletions
@@ -0,0 +1,24 @@
class Iter {
deprecated("text")
fun iterator() : IterIterator = throw Exception()
class IterIterator {
fun hasNext(): Boolean = throw UnsupportedOperationException()
fun next(): String = throw UnsupportedOperationException()
}
}
class Iter2 {
fun iterator() : Iter2Iterator = throw Exception()
class Iter2Iterator {
deprecated("text")
fun hasNext(): Boolean = throw UnsupportedOperationException()
deprecated("text")
fun next(): String = throw UnsupportedOperationException()
}
}
fun use() {
for (x in <!DEPRECATED_SYMBOL_WITH_MESSAGE!>Iter()<!>) {}
for (x in <!DEPRECATED_SYMBOL_WITH_MESSAGE, DEPRECATED_SYMBOL_WITH_MESSAGE!>Iter2()<!>) {}
}