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:
+1
-1
@@ -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
@@ -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
@@ -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)
|
||||
Reference in New Issue
Block a user