J2K: adapted for default visibility modifier 'public'

This commit is contained in:
Valentin Kipyatkov
2015-09-15 11:29:27 +03:00
parent 1ccbda6af4
commit c3ddd5d32b
477 changed files with 1359 additions and 1350 deletions
+1 -1
View File
@@ -1 +1 @@
abstract fun getNoofGears(): Int
internal abstract fun getNoofGears(): Int
+1 -1
View File
@@ -1,2 +1,2 @@
fun getT(): T {
internal fun getT(): T {
}
+1 -1
View File
@@ -1,2 +1,2 @@
fun main() {
internal fun main() {
}
@@ -2,7 +2,7 @@
// ERROR: Unresolved reference: finalize
package test
class Test : Base() {
internal class Test : Base() {
override fun hashCode(): Int {
return super.hashCode()
}
@@ -26,7 +26,7 @@ class Test : Base() {
}
}
open class Base {
internal open class Base {
override fun hashCode(): Int {
return super.hashCode()
}
+1 -1
View File
@@ -1,3 +1,3 @@
fun getString(): String {
internal fun getString(): String {
return ""
}
@@ -1,6 +1,6 @@
package demo
class Final {
fun test() {
internal class Final {
internal fun test() {
}
}
+1 -1
View File
@@ -1,2 +1,2 @@
fun test() {
internal fun test() {
}
+6 -6
View File
@@ -4,20 +4,20 @@
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Unit was expected
// ERROR: 'return' is not allowed here
// ERROR: Type mismatch: inferred type is kotlin.String but kotlin.Unit was expected
public class Java8Class {
public fun foo0(r: Function0<String>) {
class Java8Class {
fun foo0(r: Function0<String>) {
}
public fun foo1(r: Function1<Int, String>) {
fun foo1(r: Function1<Int, String>) {
}
public fun foo2(r: Function2<Int, Int, String>) {
fun foo2(r: Function2<Int, Int, String>) {
}
public fun helper() {
fun helper() {
}
public fun foo() {
fun foo() {
foo0 { "42" }
foo0 { "42" }
foo0 {
@@ -3,31 +3,31 @@ package test
import java.util.Collections
class Test {
public fun memberFun(): Int {
internal class Test {
fun memberFun(): Int {
return 1
}
companion object {
public var field: Java8Class = Java8Class()
public fun staticFun(): Java8Class {
var field: Java8Class = Java8Class()
fun staticFun(): Java8Class {
return Java8Class()
}
public fun testOverloads(): String {
fun testOverloads(): String {
return "1"
}
public fun testOverloads(i: Int): String {
fun testOverloads(i: Int): String {
return "2"
}
}
}
class Java8Class {
internal class Java8Class {
private val field = Java8Class()
public fun testStaticFunction() {
fun testStaticFunction() {
val staticFunFromSameClass = { staticFun() }
staticFunFromSameClass.invoke()
@@ -35,12 +35,12 @@ class Java8Class {
staticFunFromAnotherClass.invoke()
}
public fun testMemberFunctionThroughClass() {
fun testMemberFunctionThroughClass() {
val memberFunFromClass = { obj: Java8Class -> obj.memberFun() }
memberFunFromClass.invoke(Java8Class())
}
public fun testMemberFunctionThroughObject() {
fun testMemberFunctionThroughObject() {
val obj = Java8Class()
val memberFunFromSameClass = { obj.memberFun() }
memberFunFromSameClass.invoke()
@@ -57,7 +57,7 @@ class Java8Class {
memberFunThroughObj3.invoke()
}
public fun testConstructor() {
fun testConstructor() {
val constructorSameClass = { Java8Class() }
constructorSameClass.invoke()
@@ -71,12 +71,12 @@ class Java8Class {
qualifiedConstructorAnotherClass.invoke()
}
public fun testLibraryFunctions() {
fun testLibraryFunctions() {
val memberFunFromClass = { obj: String -> obj.length() }
memberFunFromClass.invoke("str")
}
public fun testOverloads() {
fun testOverloads() {
val constructorWithoutParams = { Test.testOverloads() }
constructorWithoutParams.invoke()
@@ -84,18 +84,18 @@ class Java8Class {
constructorWithParam.invoke(2)
}
public fun testGenericFunctions() {
fun testGenericFunctions() {
val emptyList = { Collections.emptyList() }
emptyList.invoke()
}
public fun memberFun(): Int {
fun memberFun(): Int {
return 1
}
companion object {
public fun staticFun(): Int {
fun staticFun(): Int {
return 1
}
}
+19 -19
View File
@@ -3,40 +3,40 @@ package test
import javaApi.*
import java.util.Collections
class Test {
public fun memberFun(): Int {
internal class Test {
fun memberFun(): Int {
return 1
}
public constructor(i: Int) : super() {
constructor(i: Int) : super() {
}
public constructor() {
constructor() {
}
companion object {
public var field: Java8Class = Java8Class()
public fun staticFun(): Java8Class {
var field: Java8Class = Java8Class()
fun staticFun(): Java8Class {
return Java8Class()
}
public fun testOverloads(): String {
fun testOverloads(): String {
return "1"
}
public fun testOverloads(i: Int): String {
fun testOverloads(i: Int): String {
return "2"
}
}
}
class Test2
internal class Test2
class Java8Class {
internal class Java8Class {
private val field = Java8Class()
private val h = MethodReferenceHelperClass()
public fun testStaticFunction() {
fun testStaticFunction() {
val staticFunFromSameClass = JFunction0 { staticFun() }
staticFunFromSameClass.foo()
MethodReferenceHelperClass.staticFun0 { staticFun() }
@@ -48,14 +48,14 @@ class Java8Class {
h.memberFun0 { Test.staticFun() }
}
public fun testMemberFunctionThroughClass() {
fun testMemberFunctionThroughClass() {
val memberFunFromClass = JFunction2<Java8Class, Int> { it.memberFun() }
memberFunFromClass.foo(Java8Class())
MethodReferenceHelperClass.staticFun2(JFunction2<Any, Any> { memberFun() })
h.memberFun2(JFunction2<Any, Any> { memberFun() })
}
public fun testMemberFunctionThroughObject() {
fun testMemberFunctionThroughObject() {
val obj = Java8Class()
val memberFunFromSameClass = JFunction0 { obj.memberFun() }
memberFunFromSameClass.foo()
@@ -84,7 +84,7 @@ class Java8Class {
h.memberFun0 { Test.staticFun().memberFun() }
}
public fun testConstructor() {
fun testConstructor() {
val constructorSameClass = JFunction0 { Java8Class() }
constructorSameClass.foo()
MethodReferenceHelperClass.staticFun0 { Java8Class() }
@@ -116,7 +116,7 @@ class Java8Class {
h.memberFun0 { Test2() }
}
public fun testLibraryFunctions() {
fun testLibraryFunctions() {
val memberFunFromClass = JFunction2<String, Int> { it.length() }
memberFunFromClass.foo("str")
@@ -124,7 +124,7 @@ class Java8Class {
Runnable { System.out.println() }.run()
}
public fun testOverloads() {
fun testOverloads() {
val constructorWithoutParams = JFunction1 { Test.testOverloads() }
constructorWithoutParams.foo()
MethodReferenceHelperClass.staticFun1 { Test.testOverloads() }
@@ -136,20 +136,20 @@ class Java8Class {
h.memberFun2(JFunction2<Int, String> { Test.testOverloads(it) })
}
public fun testGenericFunctions() {
fun testGenericFunctions() {
val emptyList = JFunction1<List<String>> { Collections.emptyList() }
emptyList.foo()
MethodReferenceHelperClass.staticFun1(JFunction1<List<String>> { Collections.emptyList() })
h.memberFun1(JFunction1<List<String>> { Collections.emptyList() })
}
public fun memberFun(): Int {
fun memberFun(): Int {
return 1
}
companion object {
public fun staticFun(): Int {
fun staticFun(): Int {
return 1
}
}
@@ -1,17 +1,17 @@
class C {
public fun foo1(p1: Int, p2: Int) {
internal class C {
fun foo1(p1: Int, p2: Int) {
}
public fun foo2(
fun foo2(
p1: Int,
p2: Int) {
}
public fun foo3(p1: Int,
p2: Int) {
fun foo3(p1: Int,
p2: Int) {
}
public fun foo4(
fun foo4(
p1: Int, p2: Int,
p3: Int, p4: Int) {
}
+1 -1
View File
@@ -1,2 +1,2 @@
JvmStatic public fun main(args: Array<String>) {
JvmStatic fun main(args: Array<String>) {
}
+2 -2
View File
@@ -1,4 +1,4 @@
public object A {
JvmStatic public fun main(args: Array<String>) {
object A {
JvmStatic fun main(args: Array<String>) {
}
}
@@ -1,5 +1,5 @@
// !forceNotNullTypes: false
public object A {
JvmStatic public fun main(args: Array<String>) {
object A {
JvmStatic fun main(args: Array<String>) {
}
}
+1 -1
View File
@@ -1,2 +1,2 @@
fun main(): String {
internal fun main(): String {
}
+1 -1
View File
@@ -1,2 +1,2 @@
fun main(): Int {
internal fun main(): Int {
}
@@ -1,2 +1,2 @@
fun main(): Boolean {
internal fun main(): Boolean {
}
@@ -1,3 +1,3 @@
fun isTrue(): Boolean {
internal fun isTrue(): Boolean {
return true
}
+1 -1
View File
@@ -1,3 +1,3 @@
fun getString(): String {
internal fun getString(): String {
return ""
}
+3 -3
View File
@@ -1,9 +1,9 @@
open class A {
open fun a() {
internal open class A {
internal open fun a() {
}
}
class B : A() {
internal class B : A() {
override fun a() {
}
}
+4 -4
View File
@@ -1,14 +1,14 @@
open class A {
open fun foo() {
internal open class A {
internal open fun foo() {
}
}
open class B : A() {
internal open class B : A() {
override fun foo() {
}
}
class C : B() {
internal class C : B() {
override fun foo() {
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
// ERROR: Unresolved reference: clone
class X {
internal class X {
override fun hashCode(): Int {
return super.hashCode()
}
@@ -18,7 +18,7 @@ class X {
}
}
class Y : Thread() {
internal class Y : Thread() {
Throws(CloneNotSupportedException::class)
override fun clone(): Any {
return super.clone()
+2 -2
View File
@@ -1,7 +1,7 @@
// ERROR: Unresolved reference: clone
open class Base
internal open class Base
class X : Base() {
internal class X : Base() {
override fun hashCode(): Int {
return super.hashCode()
}
+2 -2
View File
@@ -1,10 +1,10 @@
open class Base {
internal open class Base {
override fun equals(o: Any?): Boolean {
return super.equals(o)
}
}
class X : Base() {
internal class X : Base() {
override fun equals(o: Any?): Boolean {
return super.equals(o)
}
+1 -1
View File
@@ -1,2 +1,2 @@
fun <U> putU(u: U) {
internal fun <U> putU(u: U) {
}
@@ -1,2 +1,2 @@
fun <U, V, W> putUVW(u: U, v: V, w: W) {
internal fun <U, V, W> putUVW(u: U, v: V, w: W) {
}
@@ -1,4 +1,4 @@
fun foo(p1: Int, p2: Int, p3: Int): Int {
internal fun foo(p1: Int, p2: Int, p3: Int): Int {
var p1 = p1
var p3 = p3
p1++
+1 -1
View File
@@ -1,2 +1,2 @@
public fun test() {
fun test() {
}
+3 -3
View File
@@ -1,8 +1,8 @@
class A {
Synchronized fun foo() {
internal class A {
Synchronized internal fun foo() {
bar()
}
fun bar() {
internal fun bar() {
}
}
+1 -1
View File
@@ -1,2 +1,2 @@
Throws(IOException::class, SerializationException::class)
fun foo()
internal fun foo()
+2 -2
View File
@@ -1,7 +1,7 @@
package demo
class Test {
fun test(vararg args: Any) {
internal class Test {
internal fun test(vararg args: Any) {
var args = args
args = arrayOf(1, 2, 3)
}