J2K: do not produce redundant "internal" words for members in an internal class

This commit is contained in:
Valentin Kipyatkov
2015-09-16 21:50:01 +03:00
parent 367b32c309
commit 0cc2158ec1
260 changed files with 459 additions and 448 deletions
@@ -1,7 +1,7 @@
import java.util.*
internal class A {
internal fun foo(): Map<String, String> {
fun foo(): Map<String, String> {
val list1 = emptyList<String>()
val list2 = listOf(1)
val set1 = emptySet<String>()
@@ -3,7 +3,7 @@
import java.util.*
internal class A {
internal fun foo() {
fun foo() {
val list = listOf<String>(null)
val set = setOf<String>(null)
}
@@ -1,12 +1,12 @@
package demo
internal class Map {
internal fun <K, V> put(k: K?, v: V) {
fun <K, V> put(k: K?, v: V) {
}
}
internal class U {
internal fun test() {
fun test() {
val m = Map()
m.put<String, Int>(null, 10)
}
@@ -1,5 +1,5 @@
internal class A {
internal fun foo(o: Any) {
fun foo(o: Any) {
println(o.javaClass)
println(javaClass)
}
@@ -1,5 +1,5 @@
internal class A {
internal fun foo() {
fun foo() {
println()
println(1)
println("1")
+1 -1
View File
@@ -2,7 +2,7 @@ import java.lang.reflect.Constructor
internal object X {
@Throws(Exception::class)
internal fun <T> foo(constructor: Constructor<T>, args1: Array<Any>, args2: Array<Any>) {
fun <T> foo(constructor: Constructor<T>, args1: Array<Any>, args2: Array<Any>) {
constructor.newInstance(*args1)
constructor.newInstance(args1, args2)
}
+1 -1
View File
@@ -1,7 +1,7 @@
import javaApi.WithVarargConstructor
internal class X {
internal fun foo() {
fun foo() {
val o1 = WithVarargConstructor(1, *arrayOf<Any>("a"))
val o2 = WithVarargConstructor(2, arrayOf<Any>("a"), arrayOf<Any>("b"))
val o3 = WithVarargConstructor(2, "a")