New J2K: do not allow field and method declarations to be internal

For internal members new names are generated,
So, references to them from Java will be broken
This commit is contained in:
Ilya Kirillov
2019-10-07 12:32:47 +03:00
parent b30537de0e
commit d0f0b9e355
85 changed files with 185 additions and 191 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import java.io.File
internal fun foo(file: File?): List<String?>? {
fun foo(file: File?): List<String?>? {
return emptyList<String>()
}
@@ -1,6 +1,6 @@
import java.io.File
class C {
internal class C {
private fun memberFun(file: File) {}
companion object {
+1 -1
View File
@@ -2,4 +2,4 @@ package to
import kotlin.reflect.KClass
annotation class Ann(val value: KClass<*>)
internal annotation class Ann(val value: KClass<*>)
@@ -1,3 +1,3 @@
internal fun foo(p: Dependency): Double {
fun foo(p: Dependency): Double {
return p.getInt().toDouble() // explicit conversion to Double must be added on conversion (if type Dependency) is correctly resolved
}
@@ -1,4 +1,4 @@
package to
@Volatile
internal var field = 1
var field = 1
+2 -2
View File
@@ -1,9 +1,9 @@
class A {
internal fun foo() {}
fun foo() {}
internal fun bar() {}
fun bar() {}
fun f() {}
@@ -1,3 +1,3 @@
package to
internal fun foo(p: Int)
fun foo(p: Int)