Made bridge methods public.

Added test on usage of a bridge method from different module.
Bridge methods must be public in order use them from other modules.
This commit is contained in:
Igor Chevdar
2017-03-02 11:54:10 +03:00
parent 7d433be68b
commit bf65a78a93
4 changed files with 28 additions and 1 deletions
@@ -0,0 +1,9 @@
package a
interface A<T> {
fun foo(): T
}
open class C: A<Int> {
override fun foo(): Int = 42
}
@@ -0,0 +1,12 @@
import a.*
class B: C()
fun main(args: Array<String>) {
val b = B()
println(b.foo())
val c: C = b
println(c.foo())
val a: A<Int> = b
println(a.foo())
}