mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
default -> companion: replace all mentions of default and default object
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
public class J {
|
||||
public static int f() {
|
||||
return A.Default.getI1() + A.OBJECT$.getI2() + B.Named.getI1() + B.OBJECT$.getI2();
|
||||
return A.Companion.getI1() + A.OBJECT$.getI2() + B.Named.getI1() + B.OBJECT$.getI2();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
class A {
|
||||
default object {
|
||||
companion object {
|
||||
val i1 = 1
|
||||
val i2 = 2
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
default object Named {
|
||||
companion object Named {
|
||||
val i1 = 3
|
||||
val i2 = 4
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ annotation class testAnnotation
|
||||
|
||||
class A {
|
||||
|
||||
default object {
|
||||
companion object {
|
||||
val b: String = "OK"
|
||||
|
||||
platformStatic testAnnotation fun test1() = b
|
||||
|
||||
@@ -2,7 +2,7 @@ import kotlin.platform.platformStatic
|
||||
|
||||
class A {
|
||||
|
||||
default object {
|
||||
companion object {
|
||||
val b: String = "OK"
|
||||
|
||||
platformStatic val c: String = "OK"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
class Klass {
|
||||
default object {
|
||||
companion object {
|
||||
val NAME = "Klass"
|
||||
}
|
||||
}
|
||||
|
||||
trait Trait {
|
||||
default object {
|
||||
companion object {
|
||||
val NAME = "Trait"
|
||||
}
|
||||
}
|
||||
|
||||
enum class Enoom {
|
||||
default object {
|
||||
companion object {
|
||||
val NAME = "Enoom"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user