Add test for obsolete KT-6481 Mark deprecated constructor calls with strikethrough

This commit is contained in:
Pavel V. Talanov
2016-03-09 18:41:00 +03:00
parent df3f163ee2
commit c3a1643c6c
3 changed files with 66 additions and 0 deletions
@@ -0,0 +1,34 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: A.kt
class A(s: String) {
@Deprecated("")
constructor(i: Int) : this(i.toString()) {
}
}
// FILE: B.java
public class B extends A {
@Deprecated
public B(int i) {
}
public B(String s) {
}
}
// FILE: C.kt
class C @Deprecated("") constructor(s: String) {
}
// FILE: use.kt
fun use(a: A, b: B, c: C) {
<!DEPRECATION!>A<!>(3)
A("")
<!DEPRECATION!>B<!>(3)
B("")
<!DEPRECATION!>C<!>("s")
}