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
@@ -93,7 +93,7 @@ internal class SpecialDescriptorsFactory(val context: Context) {
},
returnType,
descriptor.modality,
Visibilities.PRIVATE)
Visibilities.PUBLIC)
}
}
+6
View File
@@ -573,6 +573,12 @@ task bridges_test16(type: RunKonanTest) {
source = "codegen/bridges/test16.kt"
}
task bridges_linkTest(type: LinkKonanTest) {
goldValue = "42\n42\n42\n"
source = "codegen/bridges/linkTest_main.kt"
lib = "codegen/bridges/linkTest_lib.kt"
}
task classDelegation_method(type: RunKonanTest) {
goldValue = "OKOK\n"
source = "codegen/classDelegation/method.kt"
@@ -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())
}