Do not check receiver for protected constructor calls

Checks for protected constructors should be performed manually,
because they are rather complex
This commit is contained in:
Denis Zharkov
2016-03-28 16:19:35 +03:00
parent 5bf336474d
commit 5056c43975
6 changed files with 145 additions and 0 deletions
@@ -0,0 +1,19 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
open class Outer {
inner open class A protected constructor(x: Int) {
protected constructor() : this(1)
protected constructor(x: String) : this(2)
}
inner class B1 : A(1) {}
inner class B2 : A() {}
inner class B3 : A("") {}
inner class B4 : A {
constructor() : super(1)
constructor(x: Int) : super()
constructor(x: Int, y: Int) : super("")
}
}