Fix for KT-9958: NoSuchMethodError when we call protected method from companion object

#KT-9958 Fixed
This commit is contained in:
Michael Bogdanov
2015-12-04 13:55:40 +03:00
parent a7eea6e4dd
commit a2d644f708
11 changed files with 177 additions and 24 deletions
+16
View File
@@ -0,0 +1,16 @@
package a
import b.*
class B {
companion object : A() {}
init {
foo()
}
}
fun box(): String {
B()
return result
}
+9
View File
@@ -0,0 +1,9 @@
package b
var result = "fail"
abstract class A {
protected fun foo() {
result = "OK"
}
}
@@ -0,0 +1,18 @@
package a
import b.*
interface B {
companion object : A() {}
fun test() {
foo()
}
}
class C : B
fun box(): String {
C().test()
return result
}
@@ -0,0 +1,9 @@
package b
var result = "fail"
abstract class A {
protected fun foo() {
result = "OK"
}
}