J2K: adapted for default visibility modifier 'public'
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
fun foo() {
|
||||
internal fun foo() {
|
||||
when (a) {
|
||||
1 -> {
|
||||
val x = 1
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package demo
|
||||
|
||||
public object SwitchDemo {
|
||||
public fun print(o: Any) {
|
||||
object SwitchDemo {
|
||||
fun print(o: Any) {
|
||||
println(o)
|
||||
}
|
||||
|
||||
public fun test(i: Int) {
|
||||
fun test(i: Int) {
|
||||
var monthString = "<empty>"
|
||||
when (i) {
|
||||
1 -> {
|
||||
@@ -76,7 +76,7 @@ public object SwitchDemo {
|
||||
println(monthString)
|
||||
}
|
||||
|
||||
JvmStatic public fun main(args: Array<String>) {
|
||||
JvmStatic fun main(args: Array<String>) {
|
||||
for (i in 1..12)
|
||||
test(i)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun foo() {
|
||||
internal fun foo() {
|
||||
Loop@ while (true) {
|
||||
when (take()) {
|
||||
1 -> continue
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
public object NonDefault {
|
||||
JvmStatic public fun main(args: Array<String>) {
|
||||
object NonDefault {
|
||||
JvmStatic fun main(args: Array<String>) {
|
||||
|
||||
val value = 3
|
||||
val valueString = ""
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
enum class ColorEnum {
|
||||
internal enum class ColorEnum {
|
||||
GREEN
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
fun method(colorEnum: ColorEnum): Int {
|
||||
internal class MyClass {
|
||||
internal fun method(colorEnum: ColorEnum): Int {
|
||||
when (colorEnum) {
|
||||
ColorEnum.GREEN -> return 1
|
||||
else -> return 2
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package switch_demo
|
||||
|
||||
public object SwitchDemo {
|
||||
JvmStatic public fun main(args: Array<String>) {
|
||||
object SwitchDemo {
|
||||
JvmStatic fun main(args: Array<String>) {
|
||||
val month = 8
|
||||
val monthString: String
|
||||
when (month) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
public object C {
|
||||
JvmStatic public fun main(args: Array<String>) {
|
||||
object C {
|
||||
JvmStatic fun main(args: Array<String>) {
|
||||
when (args.size()) {
|
||||
1 -> {
|
||||
run {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
fun foo() {
|
||||
internal fun foo() {
|
||||
when (a) {
|
||||
-> {
|
||||
println("1")
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package switch_demo
|
||||
|
||||
public object SwitchDemo {
|
||||
JvmStatic public fun main(args: Array<String>) {
|
||||
object SwitchDemo {
|
||||
JvmStatic fun main(args: Array<String>) {
|
||||
|
||||
val month = 8
|
||||
val monthString: String
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
public object NonDefault {
|
||||
JvmStatic public fun main(args: Array<String>) {
|
||||
object NonDefault {
|
||||
JvmStatic fun main(args: Array<String>) {
|
||||
|
||||
val value = 3
|
||||
var valueString = ""
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
fun foo(a: Int): Int {
|
||||
internal fun foo(a: Int): Int {
|
||||
when (a) {
|
||||
1 -> {
|
||||
println("1")
|
||||
|
||||
Reference in New Issue
Block a user