New J2K: Fix existing test data
This commit is contained in:
committed by
Ilya Kirillov
parent
5236858c20
commit
f752796408
@@ -0,0 +1,17 @@
|
||||
import java.io.Serializable
|
||||
|
||||
class Bar : Serializable {
|
||||
internal var foobar = 0
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 0
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
internal var foobar = 0
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
internal class Test {
|
||||
var str: String? = null
|
||||
|
||||
init {
|
||||
str = "Ola"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
class Test {
|
||||
var someRunnable: Runnable? = object : Runnable {
|
||||
override fun run() {
|
||||
this.run()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Test2 {
|
||||
private val someRunnable: Runnable = object : Runnable {
|
||||
override fun run() {
|
||||
this.run()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Handler {
|
||||
fun postDelayed(r: Runnable?, time: Long) {}
|
||||
}
|
||||
|
||||
class Test3 {
|
||||
private val handler = Handler()
|
||||
private val someRunnable: Runnable = object : Runnable {
|
||||
override fun run() {
|
||||
handler.postDelayed(this, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
fun someMethod() {
|
||||
val someRunnable: Runnable = object : Runnable {
|
||||
override fun run() {
|
||||
this.run()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
myArray[myLibrary!!.calculateIndex(100)]
|
||||
+1
@@ -0,0 +1 @@
|
||||
val a: Array<Any?> = arrayOfNulls(10)
|
||||
@@ -0,0 +1 @@
|
||||
val d2: Array<IntArray> = arrayOf()
|
||||
+1
@@ -0,0 +1 @@
|
||||
val d3: Array<Array<IntArray>?> = Array(5) { arrayOfNulls<IntArray?>(5) }
|
||||
@@ -0,0 +1 @@
|
||||
val ss: Array<Array<String?>?> = Array(5) { arrayOfNulls<String>(5) }
|
||||
@@ -0,0 +1 @@
|
||||
val sss: Array<Array<Array<String?>?>?> = Array(5) { Array(5) { arrayOfNulls<String>(5) } }
|
||||
@@ -0,0 +1 @@
|
||||
fun fromArrayToCollection(a: Array<Foo?>?) {}
|
||||
@@ -0,0 +1 @@
|
||||
val a: Array<String?> = arrayOf("abc")
|
||||
@@ -1,2 +1,3 @@
|
||||
//statement
|
||||
String x = "nya"
|
||||
assert true : "string details:" + x;
|
||||
@@ -1 +1,2 @@
|
||||
val x = "nya"
|
||||
assert(true) { "string details:$x" }
|
||||
@@ -1,2 +1,3 @@
|
||||
//statement
|
||||
int x = 0;
|
||||
x &= 2
|
||||
@@ -1 +1,2 @@
|
||||
var x = 0
|
||||
x = x and 2
|
||||
@@ -1,2 +1,3 @@
|
||||
//statement
|
||||
int x = 0;
|
||||
x |= 2
|
||||
@@ -1 +1,2 @@
|
||||
var x = 0
|
||||
x = x or 2
|
||||
@@ -1,2 +1,3 @@
|
||||
//statement
|
||||
int x = 0;
|
||||
x <<= 2
|
||||
@@ -1 +1,2 @@
|
||||
var x = 0
|
||||
x = x shl 2
|
||||
@@ -1,2 +1,3 @@
|
||||
//statement
|
||||
int x = 0;
|
||||
x >>= 2
|
||||
@@ -1 +1,2 @@
|
||||
var x = 0
|
||||
x = x shr 2
|
||||
@@ -1,2 +1,3 @@
|
||||
//statement
|
||||
int x = 0;
|
||||
x >>>= 2
|
||||
@@ -1 +1,2 @@
|
||||
var x = 0
|
||||
x = x ushr 2
|
||||
@@ -1,2 +1,3 @@
|
||||
//statement
|
||||
int x = 0;
|
||||
x ^= 2
|
||||
@@ -1 +1,2 @@
|
||||
var x = 0
|
||||
x = x xor 2
|
||||
+3
-2
@@ -1,2 +1,3 @@
|
||||
//expression
|
||||
x & 2
|
||||
//statement
|
||||
int x = 2;
|
||||
x & 2;
|
||||
@@ -1 +1,2 @@
|
||||
val x = 2
|
||||
x and 2
|
||||
+3
-2
@@ -1,2 +1,3 @@
|
||||
//expression
|
||||
x | 2
|
||||
//statement
|
||||
int x = 0;
|
||||
x | 2;
|
||||
@@ -1 +1,2 @@
|
||||
val x = 0
|
||||
x or 2
|
||||
@@ -1,2 +1,3 @@
|
||||
//expression
|
||||
x << 2
|
||||
//statement
|
||||
int x = 0;
|
||||
x << 2;
|
||||
@@ -1 +1,2 @@
|
||||
val x = 0
|
||||
x shl 2
|
||||
@@ -1,2 +1,3 @@
|
||||
//expression
|
||||
x >> 2
|
||||
//statement
|
||||
int x = 0;
|
||||
x >> 2;
|
||||
@@ -1 +1,2 @@
|
||||
val x = 0
|
||||
x shr 2
|
||||
@@ -1,2 +1,3 @@
|
||||
//expression
|
||||
x >>> 2
|
||||
//statement
|
||||
int x = 0;
|
||||
x >>> 2;
|
||||
@@ -1 +1,2 @@
|
||||
val x = 0
|
||||
x.ushr(2)
|
||||
@@ -0,0 +1,2 @@
|
||||
val x = 0
|
||||
x ushr 2
|
||||
+3
-2
@@ -1,2 +1,3 @@
|
||||
//expression
|
||||
x ^ 2
|
||||
//statement
|
||||
int x = 0;
|
||||
x ^ 2;
|
||||
@@ -1 +1,2 @@
|
||||
val x = 0
|
||||
x xor 2
|
||||
@@ -1,4 +1,5 @@
|
||||
//method
|
||||
void bar(int a) {}
|
||||
void foo() {
|
||||
{
|
||||
int a = 1;
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
fun bar(a: Int) {}
|
||||
fun foo() {
|
||||
run {
|
||||
val a = 1
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
internal class Boxing {
|
||||
fun test() {
|
||||
var i: Int? = 0
|
||||
val n: Number = 0.0f
|
||||
i = 1
|
||||
var j = i
|
||||
val k = i + 2
|
||||
i = null
|
||||
j = i!!
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
//statement
|
||||
Boolean i = 10;
|
||||
Boolean i = false;
|
||||
+1
-1
@@ -1 +1 @@
|
||||
val i = 10
|
||||
val i = false
|
||||
@@ -0,0 +1 @@
|
||||
val i: Byte = 10
|
||||
@@ -0,0 +1 @@
|
||||
val i = 10.toChar()
|
||||
@@ -0,0 +1 @@
|
||||
val i = 10.0
|
||||
@@ -0,0 +1 @@
|
||||
val i = 10f
|
||||
@@ -0,0 +1 @@
|
||||
val i: Long = 10
|
||||
@@ -0,0 +1 @@
|
||||
val i: Any = 10
|
||||
@@ -0,0 +1 @@
|
||||
val i: Short = 10
|
||||
@@ -0,0 +1,12 @@
|
||||
import java.io.PrintStream
|
||||
|
||||
internal object Library {
|
||||
val ourOut: PrintStream? = null
|
||||
}
|
||||
|
||||
internal class User {
|
||||
fun main() {
|
||||
|
||||
Library.ourOut!!.print(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
internal object Library {
|
||||
fun call() {}
|
||||
|
||||
val string: String
|
||||
get() = ""
|
||||
|
||||
}
|
||||
|
||||
internal class User {
|
||||
fun main() {
|
||||
Library.call()
|
||||
Library.string.isEmpty()
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
internal class Library {
|
||||
fun call() {}
|
||||
|
||||
val string: String
|
||||
get() = ""
|
||||
|
||||
}
|
||||
|
||||
internal class User {
|
||||
fun main() {
|
||||
val lib = Library()
|
||||
lib.call()
|
||||
lib.string.isEmpty()
|
||||
|
||||
Library().call()
|
||||
Library().string.isEmpty()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
internal abstract class Shape {
|
||||
var color: String? = null
|
||||
abstract fun area(): Double
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import javaApi.Listener
|
||||
|
||||
class Test {
|
||||
private val listener = Listener { visibility -> val a = visibility and 1 }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
internal class T {
|
||||
fun main() {}
|
||||
fun i(): Int {}
|
||||
fun s(): String? {}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
internal class T {
|
||||
var a: String? = "abc"
|
||||
var b = 10
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
internal class T {
|
||||
var a: String? = null
|
||||
var b: String? = null
|
||||
var c: String? = "abc"
|
||||
}
|
||||
+3
-2
@@ -1,2 +1,3 @@
|
||||
//class
|
||||
final class A extends Base implements I {}
|
||||
interface I {}
|
||||
class Base {}
|
||||
final class A extends Base implements I {}
|
||||
|
||||
+3
-1
@@ -1 +1,3 @@
|
||||
internal class A : Base(), I
|
||||
internal interface I
|
||||
internal open class Base
|
||||
internal class A : Base(), I
|
||||
|
||||
+4
-1
@@ -1,2 +1,5 @@
|
||||
//class
|
||||
class Base {}
|
||||
interface I0 {}
|
||||
interface I1 {}
|
||||
interface I2 {}
|
||||
final class A extends Base implements I0, I1, I2 {}
|
||||
+4
@@ -1 +1,5 @@
|
||||
internal open class Base
|
||||
internal interface I0
|
||||
internal interface I1
|
||||
internal interface I2
|
||||
internal class A : Base(), I0, I1, I2
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : Any!, V : Any!>(initialCapacity: Int) Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : Any!, V : Any!>(initialCapacity: Int) Please specify it explicitly.
|
||||
package demo
|
||||
|
||||
internal class Test {
|
||||
constructor() {}
|
||||
constructor(s: String?) {}
|
||||
}
|
||||
|
||||
internal class User {
|
||||
fun main() {
|
||||
val m: HashMap<*, *> = HashMap<Any?, Any?>(1)
|
||||
val m2: HashMap<*, *> = HashMap<Any?, Any?>(10)
|
||||
|
||||
val t1 = Test()
|
||||
val t2 = Test("")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
internal open class Base {
|
||||
companion object {
|
||||
const val CONSTANT = 10
|
||||
}
|
||||
}
|
||||
|
||||
internal class Derived : Base() {
|
||||
fun foo() {}
|
||||
}
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
//class
|
||||
class Base {}
|
||||
final class A extends Base {}
|
||||
@@ -1 +1,2 @@
|
||||
internal open class Base
|
||||
internal class A : Base()
|
||||
@@ -0,0 +1,6 @@
|
||||
internal object Util {
|
||||
|
||||
const val CONSTANT = 10
|
||||
fun util1() {}
|
||||
fun util2() {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
internal object Util {
|
||||
|
||||
const val CONSTANT = 10
|
||||
fun util1() {}
|
||||
fun util2() {}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
object Util {
|
||||
const val publicStr = ""
|
||||
internal const val protectedStr = ""
|
||||
internal const val packageStr = ""
|
||||
private const val privateStr = ""
|
||||
|
||||
fun publicMethod() {}
|
||||
internal fun protectedMethod() {}
|
||||
internal fun packageMethod() {}
|
||||
private fun privateMethod() {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
val constrArgTypes: Array<Class<*>?> = arrayOf(Array<String>::class.java, String::class.java, Int::class.java, Double::class.java)
|
||||
@@ -0,0 +1 @@
|
||||
if (a!!.isEmpty()) 0 else 1
|
||||
@@ -0,0 +1,27 @@
|
||||
internal class C(val myArg1: Int) {
|
||||
var myArg2: Int
|
||||
var myArg3: Int
|
||||
|
||||
constructor(arg1: Int, arg2: Int, arg3: Int) : this(arg1) {
|
||||
myArg2 = arg2
|
||||
myArg3 = arg3
|
||||
}
|
||||
|
||||
constructor(arg1: Int, arg2: Int) : this(arg1) {
|
||||
myArg2 = arg2
|
||||
myArg3 = 0
|
||||
}
|
||||
|
||||
init {
|
||||
myArg2 = 0
|
||||
myArg3 = 0
|
||||
}
|
||||
}
|
||||
|
||||
object User {
|
||||
fun main() {
|
||||
val c1 = C(100, 100, 100)
|
||||
val c2 = C(100, 100)
|
||||
val c3 = C(100)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class Test {
|
||||
private val s: String?
|
||||
internal var b = false
|
||||
internal var d = 0.0
|
||||
|
||||
constructor() {
|
||||
b = true
|
||||
}
|
||||
|
||||
constructor(s: String?) {
|
||||
this.s = s
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.test.customer
|
||||
|
||||
internal class Customer(val firstName: String?, val lastName: String?) {
|
||||
init {
|
||||
doSmthBefore()
|
||||
doSmthAfter()
|
||||
}
|
||||
|
||||
private fun doSmthBefore() {}
|
||||
|
||||
private fun doSmthAfter() {}
|
||||
}
|
||||
|
||||
internal class CustomerBuilder {
|
||||
var _firstName: String? = "Homer"
|
||||
var _lastName: String? = "Simpson"
|
||||
fun WithFirstName(firstName: String?): CustomerBuilder {
|
||||
_firstName = firstName
|
||||
return this
|
||||
}
|
||||
|
||||
fun WithLastName(lastName: String?): CustomerBuilder {
|
||||
_lastName = lastName
|
||||
return this
|
||||
}
|
||||
|
||||
fun Build(): Customer {
|
||||
return Customer(_firstName, _lastName)
|
||||
}
|
||||
}
|
||||
|
||||
object User {
|
||||
fun main() {
|
||||
val customer = CustomerBuilder()
|
||||
.WithFirstName("Homer")
|
||||
.WithLastName("Simpson")
|
||||
.Build()
|
||||
println(customer.firstName)
|
||||
println(customer.lastName)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
internal class C(p: Int, c: C) {
|
||||
var p = 0
|
||||
|
||||
init {
|
||||
c.p = p
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
internal class C(p: Int) {
|
||||
var p: Int
|
||||
|
||||
init {
|
||||
this.p = 0
|
||||
if (p > 0) {
|
||||
this.p = p
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
internal class C(x: String?) {
|
||||
var x: Any?
|
||||
|
||||
init {
|
||||
this.x = x
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
internal class C(x: Any?, b: Boolean) {
|
||||
var x: Any? = null
|
||||
|
||||
init {
|
||||
if (b) {
|
||||
this.x = x
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
internal open class Base(o: Any?, l: Int)
|
||||
|
||||
internal class C(private val string: String) : Base(string, string.length)
|
||||
+1
@@ -0,0 +1 @@
|
||||
internal class C(@Deprecated("") private val p1: Int, private val myP2: Int, @SuppressWarnings("x") var p3: Int)
|
||||
@@ -0,0 +1,28 @@
|
||||
class Identifier<T> {
|
||||
val name: T?
|
||||
private var myHasDollar = false
|
||||
private var myNullable = true
|
||||
|
||||
constructor(name: T?) {
|
||||
this.name = name
|
||||
}
|
||||
|
||||
constructor(name: T?, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myNullable = isNullable
|
||||
}
|
||||
|
||||
constructor(name: T?, hasDollar: Boolean, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myHasDollar = hasDollar
|
||||
myNullable = isNullable
|
||||
}
|
||||
}
|
||||
|
||||
object User {
|
||||
fun main() {
|
||||
val i1: Identifier<*> = Identifier<String?>("name", false, true)
|
||||
val i2 = Identifier<String?>("name", false)
|
||||
val i3 = Identifier<String?>("name")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class Identifier {
|
||||
val name: String?
|
||||
private var myHasDollar = false
|
||||
private var myNullable = true
|
||||
|
||||
constructor(name: String?) {
|
||||
this.name = name
|
||||
}
|
||||
|
||||
constructor(name: String?, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myNullable = isNullable
|
||||
}
|
||||
|
||||
constructor(name: String?, hasDollar: Boolean, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myHasDollar = hasDollar
|
||||
myNullable = isNullable
|
||||
}
|
||||
}
|
||||
|
||||
object User {
|
||||
fun main() {
|
||||
val i1 = Identifier("name", false, true)
|
||||
val i2 = Identifier("name", false)
|
||||
val i3 = Identifier("name")
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
internal class A @JvmOverloads constructor(nested: Nested? = Nested(Nested.FIELD)) {
|
||||
internal class Nested(p: Int) {
|
||||
companion object {
|
||||
const val FIELD = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
internal class A @JvmOverloads constructor(nested: Nested? = Nested(Nested.FIELD)) {
|
||||
internal class Nested(p: Int) {
|
||||
companion object {
|
||||
const val FIELD = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class B {
|
||||
var nested: A.Nested? = null
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package pack
|
||||
|
||||
internal class A @JvmOverloads constructor(nested: Nested? = Nested(Nested.FIELD)) {
|
||||
internal class Nested(p: Int) {
|
||||
companion object {
|
||||
const val FIELD = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class B {
|
||||
var nested: A.Nested? = null
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package pack
|
||||
|
||||
internal class A @JvmOverloads constructor(nested: Nested? = Nested(Nested.FIELD)) {
|
||||
internal class Nested(p: Int) {
|
||||
companion object {
|
||||
const val FIELD = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class B {
|
||||
var nested: A.Nested? = null
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
internal open class Base(nested: Nested?) {
|
||||
internal class Nested(p: Int) {
|
||||
companion object {
|
||||
const val FIELD = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class Derived : Base(Base.Nested(Base.Nested.FIELD))
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
internal class A {
|
||||
private var s: String? = ""
|
||||
private var x = 0
|
||||
|
||||
constructor() {}
|
||||
|
||||
@JvmOverloads
|
||||
constructor(p: Int, s: String?, x: Int = 1) {
|
||||
this.s = s
|
||||
this.x = x
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
internal class A() {
|
||||
private var s: String? = ""
|
||||
private var x = 0
|
||||
|
||||
@JvmOverloads
|
||||
constructor(p: Int, s: String?, x: Int = 1) : this() {
|
||||
this.s = s
|
||||
this.x = x
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
internal class C() {
|
||||
|
||||
constructor(p: Int) : this() {
|
||||
println(staticField1 + C.staticField2)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val staticField1 = 0
|
||||
private const val staticField2 = 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class Test {
|
||||
private val myName: String?
|
||||
internal var a = false
|
||||
internal var b = 0.0
|
||||
internal var c = 0f
|
||||
internal var d: Long = 0
|
||||
internal var e = 0
|
||||
protected var f: Short = 0
|
||||
protected var g = 0.toChar()
|
||||
|
||||
constructor() {}
|
||||
|
||||
constructor(name: String?) {
|
||||
myName = foo(name)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
internal fun foo(n: String?): String {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object User {
|
||||
fun main() {
|
||||
val t = Test("name")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
var k: Int
|
||||
var l: Int
|
||||
var m: Int
|
||||
@@ -0,0 +1 @@
|
||||
var s: Int
|
||||
+1
@@ -0,0 +1 @@
|
||||
var s: String
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
import kotlinApi.KotlinClassAbstractProperty
|
||||
|
||||
class KotlinClassAbstractPropertyImpl : KotlinClassAbstractProperty() {
|
||||
override var isVisible = false
|
||||
private set
|
||||
|
||||
private fun test() {
|
||||
isVisible = true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class X {
|
||||
internal fun foo() {
|
||||
val runnable: Runnable = object : Runnable {
|
||||
val value = 10
|
||||
|
||||
override fun run() {
|
||||
println(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
internal class A(// comment for field2 getter
|
||||
// comment for field2 setter
|
||||
var field2: Int // comment for field2
|
||||
) {
|
||||
// Comment for field1
|
||||
// Comment for field1 getter
|
||||
/**
|
||||
* Comment for field1 setter
|
||||
*/
|
||||
var field1 = 0
|
||||
|
||||
// comment before field3
|
||||
var field3 = 0 // comment for field3
|
||||
// comment for field3 getter
|
||||
// comment for field3 setter
|
||||
|
||||
// comment for getProperty
|
||||
// comment for setProperty
|
||||
var property: Int
|
||||
get() = 1
|
||||
set(value) {} // end of getProperty
|
||||
// end of setProperty
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Test(var id: String?, val name: String?, val age: Int) {
|
||||
|
||||
init {
|
||||
println(age)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class Test(count: Int) {
|
||||
var count: Int
|
||||
private set
|
||||
|
||||
init {
|
||||
this.count = count
|
||||
}
|
||||
|
||||
fun inc() {
|
||||
count++
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user