J2K: adapted for default visibility modifier 'public'
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
annotation class Anon(public val stringArray: Array<String>, public val intArray: IntArray, // string
|
||||
public val string: String)
|
||||
annotation internal class Anon(val stringArray: Array<String>, val intArray: IntArray, // string
|
||||
val string: String)
|
||||
|
||||
Anon(string = "a", stringArray = arrayOf("a", "b"), intArray = intArrayOf(1, 2))
|
||||
@Target(AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD)
|
||||
annotation class I
|
||||
annotation internal class I
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||
annotation class J
|
||||
annotation internal class J
|
||||
|
||||
@Target
|
||||
annotation class K
|
||||
annotation internal class K
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
annotation class Anon(public val s: String = "a", public val stringArray: Array<String> = arrayOf("a", "b"), public val intArray: IntArray)
|
||||
annotation internal class Anon(val s: String = "a", val stringArray: Array<String> = arrayOf("a", "b"), val intArray: IntArray)
|
||||
|
||||
Anon(intArray = intArrayOf(1, 2))
|
||||
class A
|
||||
internal class A
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
// ERROR: Body is not allowed for annotation class
|
||||
// ERROR: Modifier 'companion' is not applicable inside 'annotation class'
|
||||
annotation class Anon(public val value: String) {
|
||||
annotation internal class Anon(val value: String) {
|
||||
|
||||
public enum class E {
|
||||
enum class E {
|
||||
A, B
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
public val field: E = E.A
|
||||
val field: E = E.A
|
||||
}
|
||||
}
|
||||
|
||||
Anon("a")
|
||||
interface I {
|
||||
internal interface I {
|
||||
companion object {
|
||||
public val e: Anon.E = Anon.field
|
||||
val e: Anon.E = Anon.field
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
annotation class Anon(public vararg val value: String, public val x: Int = 1)
|
||||
annotation internal class Anon(vararg val value: String, val x: Int = 1)
|
||||
|
||||
Anon("a", "b")
|
||||
interface I1
|
||||
internal interface I1
|
||||
|
||||
Anon("c", "d", x = 1)
|
||||
interface I2
|
||||
internal interface I2
|
||||
|
||||
Anon("c", "d", x = 1)
|
||||
interface I3
|
||||
internal interface I3
|
||||
|
||||
Anon(value = *arrayOf("c", "d"))
|
||||
interface I4
|
||||
internal interface I4
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// ERROR: This annotation is not applicable to target 'local variable'
|
||||
// ERROR: This annotation is not applicable to target 'value parameter'
|
||||
// ERROR: This annotation is not applicable to target 'value parameter'
|
||||
import javaApi.*
|
||||
|
||||
Anon1(value = *arrayOf("a"), stringArray = arrayOf("b"), intArray = intArrayOf(1, 2), string = "x")
|
||||
@@ -8,22 +11,22 @@ Anon5(1)
|
||||
Anon6("x", "y")
|
||||
Anon7(String::class, StringBuilder::class)
|
||||
Anon8(classes = arrayOf(String::class, StringBuilder::class))
|
||||
class C {
|
||||
internal class C {
|
||||
Anon5(1) Deprecated("") private val field1 = 0
|
||||
|
||||
Anon5(1)
|
||||
private val field2 = 0
|
||||
|
||||
Anon5(1) var field3 = 0
|
||||
Anon5(1) internal var field3 = 0
|
||||
|
||||
Anon5(1)
|
||||
var field4 = 0
|
||||
internal var field4 = 0
|
||||
|
||||
Anon6
|
||||
fun foo(Deprecated("") p1: Int, Deprecated("") Anon5(2) p2: Char) {
|
||||
internal fun foo(Deprecated("") p1: Int, Deprecated("") Anon5(2) p2: Char) {
|
||||
@Deprecated("") @Anon5(3) val c = 'a'
|
||||
}
|
||||
|
||||
Anon5(1) fun bar() {
|
||||
Anon5(1) internal fun bar() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation class Ann(public val value: KClass<*>, public val other: KClass<*>)
|
||||
annotation internal class Ann(val value: KClass<*>, val other: KClass<*>)
|
||||
|
||||
Ann(other = String::class, value = Any::class)
|
||||
class C
|
||||
internal class C
|
||||
@@ -1,9 +1,9 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation class Ann(public vararg val value: KClass<*>)
|
||||
annotation internal class Ann(vararg val value: KClass<*>)
|
||||
|
||||
Ann(String::class, Any::class)
|
||||
class C
|
||||
internal class C
|
||||
|
||||
Ann
|
||||
class D
|
||||
internal class D
|
||||
@@ -2,23 +2,23 @@
|
||||
// !specifyLocalVariableTypeByDefault: true
|
||||
package test
|
||||
|
||||
public class Test(str: String) {
|
||||
var myStr = "String2"
|
||||
class Test(str: String) {
|
||||
internal var myStr = "String2"
|
||||
|
||||
init {
|
||||
myStr = str
|
||||
}
|
||||
|
||||
public fun sout(str: String) {
|
||||
fun sout(str: String) {
|
||||
// UNNECESSARY_NOT_NULL_ASSERTION heuristic does not work any more, instead we can skip generating !! altogether
|
||||
println(str)
|
||||
}
|
||||
|
||||
public fun dummy(str: String): String {
|
||||
fun dummy(str: String): String {
|
||||
return str
|
||||
}
|
||||
|
||||
public fun test() {
|
||||
fun test() {
|
||||
sout("String")
|
||||
val test: String = "String2"
|
||||
sout(test)
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
// !specifyLocalVariableTypeByDefault: true
|
||||
package test
|
||||
|
||||
class Foo {
|
||||
fun execute() {
|
||||
internal class Foo {
|
||||
internal fun execute() {
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
var fooNotNull = Foo()
|
||||
var fooNullable: Foo? = null
|
||||
internal class Bar {
|
||||
internal var fooNotNull = Foo()
|
||||
internal var fooNullable: Foo? = null
|
||||
}
|
||||
|
||||
class Test {
|
||||
public fun test(barNotNull: Bar, barNullable: Bar?) {
|
||||
internal class Test {
|
||||
fun test(barNotNull: Bar, barNullable: Bar?) {
|
||||
barNotNull.fooNotNull.execute()
|
||||
barNotNull.fooNullable!!.execute()
|
||||
barNullable!!.fooNotNull.execute()
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
// !specifyLocalVariableTypeByDefault: true
|
||||
package test
|
||||
|
||||
public class Test(str: String?) {
|
||||
var myStr: String? = "String2"
|
||||
class Test(str: String?) {
|
||||
internal var myStr: String? = "String2"
|
||||
|
||||
init {
|
||||
myStr = str
|
||||
}
|
||||
|
||||
public fun sout(str: String?) {
|
||||
fun sout(str: String?) {
|
||||
println(str)
|
||||
}
|
||||
|
||||
public fun dummy(str: String?): String? {
|
||||
fun dummy(str: String?): String? {
|
||||
return str
|
||||
}
|
||||
|
||||
public fun test() {
|
||||
fun test() {
|
||||
sout("String")
|
||||
val test: String? = "String2"
|
||||
sout(test)
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
class C Deprecated("")
|
||||
internal class C Deprecated("")
|
||||
constructor()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Test {
|
||||
var str: String
|
||||
internal class Test {
|
||||
internal var str: String
|
||||
|
||||
init {
|
||||
str = "Ola"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
object Test {
|
||||
var str: String
|
||||
internal object Test {
|
||||
internal var str: String
|
||||
|
||||
init {
|
||||
str = "Ola"
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
fun fromArrayToCollection(a: Array<Foo>) {
|
||||
internal fun fromArrayToCollection(a: Array<Foo>) {
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
// !specifyLocalVariableTypeByDefault: true
|
||||
import java.util.HashSet
|
||||
|
||||
class Foo {
|
||||
fun foo(o: HashSet<Any?>?) {
|
||||
internal class Foo {
|
||||
internal fun foo(o: HashSet<Any?>?) {
|
||||
val o2: HashSet<Any?>? = o
|
||||
var foo: Int = 0
|
||||
foo = o2!!.size()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java.util.HashSet
|
||||
|
||||
class Foo {
|
||||
fun foo(o: HashSet<Any>) {
|
||||
internal class Foo {
|
||||
internal fun foo(o: HashSet<Any>) {
|
||||
val o2 = o
|
||||
var foo = 0
|
||||
foo = o2.size()
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
fun foo() {
|
||||
internal fun foo() {
|
||||
run {
|
||||
val a = 1
|
||||
bar(a)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
class Boxing {
|
||||
fun test() {
|
||||
internal class Boxing {
|
||||
internal fun test() {
|
||||
var i: Int? = 0
|
||||
val n = 0.0f
|
||||
i = 1
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// ERROR: None of the following functions can be called with the arguments supplied: public open fun valueOf(p0: kotlin.Short): kotlin.Short! defined in java.lang.Short public open fun valueOf(p0: kotlin.String!): kotlin.Short! defined in java.lang.Short
|
||||
package demo
|
||||
|
||||
class Test {
|
||||
fun test() {
|
||||
internal class Test {
|
||||
internal fun test() {
|
||||
val i = Integer.valueOf(100)
|
||||
val s = 3
|
||||
val ss = java.lang.Short.valueOf(s)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
object Library {
|
||||
val ourOut: java.io.PrintStream
|
||||
internal object Library {
|
||||
internal val ourOut: java.io.PrintStream
|
||||
}
|
||||
|
||||
class User {
|
||||
fun main() {
|
||||
internal class User {
|
||||
internal fun main() {
|
||||
Library.ourOut.print(1)
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
object Library {
|
||||
fun call() {
|
||||
internal object Library {
|
||||
internal fun call() {
|
||||
}
|
||||
|
||||
fun getString(): String {
|
||||
internal fun getString(): String {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
class User {
|
||||
fun main() {
|
||||
internal class User {
|
||||
internal fun main() {
|
||||
Library.call()
|
||||
Library.getString().isEmpty()
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
// !forceNotNullTypes: false
|
||||
// !specifyLocalVariableTypeByDefault: true
|
||||
class Library {
|
||||
fun call() {
|
||||
internal class Library {
|
||||
internal fun call() {
|
||||
}
|
||||
|
||||
fun getString(): String? {
|
||||
internal fun getString(): String? {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
class User {
|
||||
fun main() {
|
||||
internal class User {
|
||||
internal fun main() {
|
||||
val lib: Library = Library()
|
||||
lib.call()
|
||||
lib.getString()!!.isEmpty()
|
||||
|
||||
+5
-5
@@ -1,14 +1,14 @@
|
||||
class Library {
|
||||
fun call() {
|
||||
internal class Library {
|
||||
internal fun call() {
|
||||
}
|
||||
|
||||
fun getString(): String {
|
||||
internal fun getString(): String {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
class User {
|
||||
fun main() {
|
||||
internal class User {
|
||||
internal fun main() {
|
||||
val lib = Library()
|
||||
lib.call()
|
||||
lib.getString().isEmpty()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class Library {
|
||||
public val myString: String
|
||||
internal class Library {
|
||||
val myString: String
|
||||
}
|
||||
|
||||
class User {
|
||||
fun main() {
|
||||
internal class User {
|
||||
internal fun main() {
|
||||
Library().myString.isEmpty()
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
package test
|
||||
|
||||
public class Short(s: String) {
|
||||
class Short(s: String) {
|
||||
companion object {
|
||||
public fun valueOf(value: String): Short {
|
||||
fun valueOf(value: String): Short {
|
||||
return Short(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object Test {
|
||||
public fun test() {
|
||||
internal object Test {
|
||||
fun test() {
|
||||
test.Short.valueOf("1")
|
||||
test.Short.valueOf("1")
|
||||
java.lang.Short.valueOf("1")
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
abstract class A {
|
||||
abstract fun callme()
|
||||
internal abstract class A {
|
||||
internal abstract fun callme()
|
||||
|
||||
fun callmetoo() {
|
||||
internal fun callmetoo() {
|
||||
print("This is a concrete method.")
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
abstract class Shape {
|
||||
public var color: String
|
||||
public abstract fun area(): Double
|
||||
internal abstract class Shape {
|
||||
var color: String
|
||||
abstract fun area(): Double
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
class Test
|
||||
internal class Test
|
||||
@@ -1,10 +1,10 @@
|
||||
class T {
|
||||
fun main() {
|
||||
internal class T {
|
||||
internal fun main() {
|
||||
}
|
||||
|
||||
fun i(): Int {
|
||||
internal fun i(): Int {
|
||||
}
|
||||
|
||||
fun s(): String {
|
||||
internal fun s(): String {
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
class T {
|
||||
var a = "abc"
|
||||
var b = 10
|
||||
internal class T {
|
||||
internal var a = "abc"
|
||||
internal var b = 10
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
class T {
|
||||
var a: String
|
||||
var b: String
|
||||
var c = "abc"
|
||||
internal class T {
|
||||
internal var a: String
|
||||
internal var b: String
|
||||
internal var c = "abc"
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
class A
|
||||
internal class A
|
||||
+1
-1
@@ -1 +1 @@
|
||||
class A : Base(), I
|
||||
internal class A : Base(), I
|
||||
+1
-1
@@ -1 +1 @@
|
||||
class A : Base(), I0, I1, I2
|
||||
internal class A : Base(), I0, I1, I2
|
||||
+1
-1
@@ -1 +1 @@
|
||||
class Test
|
||||
internal class Test
|
||||
+1
-1
@@ -1 +1 @@
|
||||
class Entry<K, V>
|
||||
internal class Entry<K, V>
|
||||
@@ -1,3 +1,3 @@
|
||||
interface A {
|
||||
public class B
|
||||
internal interface A {
|
||||
class B
|
||||
}
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
class A {
|
||||
inner class B
|
||||
internal class A {
|
||||
internal inner class B
|
||||
}
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
class A {
|
||||
enum class E {
|
||||
internal class A {
|
||||
internal enum class E {
|
||||
A,
|
||||
B,
|
||||
C
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
class A {
|
||||
interface I
|
||||
internal class A {
|
||||
internal interface I
|
||||
}
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
class S {
|
||||
class Inner
|
||||
internal class S {
|
||||
internal class Inner
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
class Test
|
||||
internal class Test
|
||||
+5
-5
@@ -4,16 +4,16 @@ package demo
|
||||
|
||||
import java.util.HashMap
|
||||
|
||||
class Test {
|
||||
constructor() {
|
||||
internal class Test {
|
||||
internal constructor() {
|
||||
}
|
||||
|
||||
constructor(s: String) {
|
||||
internal constructor(s: String) {
|
||||
}
|
||||
}
|
||||
|
||||
class User {
|
||||
fun main() {
|
||||
internal class User {
|
||||
internal fun main() {
|
||||
val m = HashMap(1)
|
||||
val m2 = HashMap(10)
|
||||
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
open class Base {
|
||||
internal open class Base {
|
||||
companion object {
|
||||
public val CONSTANT: Int = 10
|
||||
val CONSTANT: Int = 10
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
fun foo() {
|
||||
internal class Derived : Base() {
|
||||
internal fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
class S {
|
||||
fun sB(): Boolean {
|
||||
internal class S {
|
||||
internal fun sB(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
companion object {
|
||||
var myI = 10
|
||||
internal var myI = 10
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
object S {
|
||||
fun staticF(): Boolean {
|
||||
internal object S {
|
||||
internal fun staticF(): Boolean {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
class S {
|
||||
fun sB(): Boolean {
|
||||
internal class S {
|
||||
internal fun sB(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun sI(): Int {
|
||||
internal fun sI(): Int {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public class MyClass {
|
||||
class MyClass {
|
||||
private fun init(arg1: Int, arg2: Int, arg3: Int) {
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
public class Test
|
||||
class Test
|
||||
+1
-1
@@ -1 +1 @@
|
||||
class A : Base()
|
||||
internal class A : Base()
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
object S {
|
||||
fun sB(): Boolean {
|
||||
internal object S {
|
||||
internal fun sB(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
fun sI(): Int {
|
||||
internal fun sI(): Int {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
object Util {
|
||||
public fun util1() {
|
||||
internal object Util {
|
||||
fun util1() {
|
||||
}
|
||||
|
||||
public fun util2() {
|
||||
fun util2() {
|
||||
}
|
||||
|
||||
public val CONSTANT: Int = 10
|
||||
val CONSTANT: Int = 10
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
object Util {
|
||||
internal object Util {
|
||||
|
||||
public fun util1() {
|
||||
fun util1() {
|
||||
}
|
||||
|
||||
public fun util2() {
|
||||
fun util2() {
|
||||
}
|
||||
|
||||
public val CONSTANT: Int = 10
|
||||
val CONSTANT: Int = 10
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
object Util {
|
||||
public fun util1() {
|
||||
internal object Util {
|
||||
fun util1() {
|
||||
}
|
||||
|
||||
public fun util2() {
|
||||
fun util2() {
|
||||
}
|
||||
|
||||
public val CONSTANT: Int = 10
|
||||
val CONSTANT: Int = 10
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
public object A {
|
||||
JvmStatic public fun main(args: Array<String>) {
|
||||
object A {
|
||||
JvmStatic fun main(args: Array<String>) {
|
||||
println(Void.TYPE)
|
||||
println(Integer.TYPE)
|
||||
println(java.lang.Double.TYPE)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java.io.File
|
||||
|
||||
class C {
|
||||
fun foo(file: File): String {
|
||||
internal class C {
|
||||
internal fun foo(file: File): String {
|
||||
val parent = file.parentFile ?: return ""
|
||||
return parent.name
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class C {
|
||||
fun foo(s: String?): String {
|
||||
internal class C {
|
||||
internal fun foo(s: String?): String {
|
||||
return s ?: ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java.io.File
|
||||
|
||||
class C {
|
||||
fun foo(file: File?) {
|
||||
internal class C {
|
||||
internal fun foo(file: File?) {
|
||||
file?.delete()
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
class C {
|
||||
fun foo(o: Any) {
|
||||
internal class C {
|
||||
internal fun foo(o: Any) {
|
||||
if (o !is String) return
|
||||
println("String")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class C {
|
||||
fun foo(o: Any) {
|
||||
internal class C {
|
||||
internal fun foo(o: Any) {
|
||||
if (o is String) {
|
||||
val l = o.length()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
class C {
|
||||
fun foo(o: Any) {
|
||||
internal class C {
|
||||
internal fun foo(o: Any) {
|
||||
if (o is String) {
|
||||
val l = o.length()
|
||||
val substring = o.substring(l - 2)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import javaApi.Base
|
||||
|
||||
class C : Base() {
|
||||
public fun f() {
|
||||
internal class C : Base() {
|
||||
fun f() {
|
||||
val other = Base()
|
||||
val value = other.property + property
|
||||
other.property = 1
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ package foo
|
||||
import java.util.ArrayList // we need ArrayList
|
||||
|
||||
// let's declare a class:
|
||||
class A /* just a sample name*/ : Runnable /* let's implement Runnable */ {
|
||||
fun foo/* again a sample name */(p: Int /* parameter p */, c: Char /* parameter c */) {
|
||||
internal class A /* just a sample name*/ : Runnable /* let's implement Runnable */ {
|
||||
internal fun foo/* again a sample name */(p: Int /* parameter p */, c: Char /* parameter c */) {
|
||||
// let's print something:
|
||||
println("1") // print 1
|
||||
println("2") // print 2
|
||||
|
||||
+5
-5
@@ -2,20 +2,20 @@
|
||||
// ERROR: A 'return' expression required in a function with a block body ('{...}')
|
||||
package foo
|
||||
|
||||
class A {
|
||||
fun /* nothing to return */ foo(/* no parameters at all */) {
|
||||
internal class A {
|
||||
internal fun /* nothing to return */ foo(/* no parameters at all */) {
|
||||
// let declare a variable
|
||||
// with 2 comments before
|
||||
val /*int*/ a /* it's a */ = 2 /* it's 2 */ + 1 /* it's 1 */ // variable a declared
|
||||
} // end of foo
|
||||
|
||||
fun /* we return int*/ foo(/*int*/ p: Int/* parameter p */): Int {
|
||||
internal fun /* we return int*/ foo(/*int*/ p: Int/* parameter p */): Int {
|
||||
/* body is empty */
|
||||
}
|
||||
|
||||
private /*it's private*/ val field = 0
|
||||
|
||||
public /*it's public*/ fun foo(s: String): Char {
|
||||
/*it's public*/ fun foo(s: String): Char {
|
||||
}
|
||||
|
||||
protected /*it's protected*/ fun foo(c: Char) {
|
||||
@@ -23,6 +23,6 @@ class A {
|
||||
|
||||
companion object {
|
||||
|
||||
public /*it's public*//*and static*//*and final*/ val C: Int = 1
|
||||
/*it's public*//*and static*//*and final*/ val C: Int = 1
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ class B {
|
||||
private int x;
|
||||
|
||||
// this constructor will disappear
|
||||
B(int x) {
|
||||
public B(int x) {
|
||||
this.x = x;
|
||||
} // end of constructor body
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class A// this is a primary constructor
|
||||
JvmOverloads constructor(p: Int = 1) {
|
||||
internal class A// this is a primary constructor
|
||||
JvmOverloads internal constructor(p: Int = 1) {
|
||||
private val v: Int
|
||||
|
||||
init {
|
||||
@@ -7,15 +7,15 @@ JvmOverloads constructor(p: Int = 1) {
|
||||
} // end of primary constructor body
|
||||
|
||||
// this is a secondary constructor 2
|
||||
constructor(s: String) : this(s.length()) {
|
||||
internal constructor(s: String) : this(s.length()) {
|
||||
} // end of secondary constructor 2 body
|
||||
}// this is a secondary constructor 1
|
||||
// end of secondary constructor 1 body
|
||||
|
||||
class B// this constructor will disappear
|
||||
internal class B// this constructor will disappear
|
||||
(private val x: Int) // end of constructor body
|
||||
{
|
||||
|
||||
fun foo() {
|
||||
internal fun foo() {
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
class A {
|
||||
internal class A {
|
||||
private val isOpen = true // ideally should be atomic boolean
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
class C(private val p1: Int /* parameter p1 */ // field p1
|
||||
,
|
||||
/**
|
||||
* Field myP2
|
||||
*/
|
||||
private val myP2: Int, /* Field p3 */ public var p3: Int)
|
||||
internal class C(private val p1: Int /* parameter p1 */ // field p1
|
||||
,
|
||||
/**
|
||||
* Field myP2
|
||||
*/
|
||||
private val myP2: Int, /* Field p3 */ var p3: Int)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun foo(b: Boolean) {
|
||||
internal fun foo(b: Boolean) {
|
||||
if (b)
|
||||
println("true")
|
||||
else
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package pack
|
||||
|
||||
class C JvmOverloads constructor(arg1: Int, arg2: Int = 0, arg3: Int = 0)
|
||||
internal class C JvmOverloads internal constructor(arg1: Int, arg2: Int = 0, arg3: Int = 0)
|
||||
|
||||
public object User {
|
||||
public fun main() {
|
||||
object User {
|
||||
fun main() {
|
||||
val c1 = C(100, 100, 100)
|
||||
val c2 = C(100, 100)
|
||||
val c3 = C(100)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
class C(val myArg1: Int) {
|
||||
var myArg2: Int = 0
|
||||
var myArg3: Int = 0
|
||||
internal class C internal constructor(internal val myArg1: Int) {
|
||||
internal var myArg2: Int = 0
|
||||
internal var myArg3: Int = 0
|
||||
|
||||
constructor(arg1: Int, arg2: Int, arg3: Int) : this(arg1) {
|
||||
internal constructor(arg1: Int, arg2: Int, arg3: Int) : this(arg1) {
|
||||
myArg2 = arg2
|
||||
myArg3 = arg3
|
||||
}
|
||||
|
||||
constructor(arg1: Int, arg2: Int) : this(arg1) {
|
||||
internal constructor(arg1: Int, arg2: Int) : this(arg1) {
|
||||
myArg2 = arg2
|
||||
myArg3 = 0
|
||||
}
|
||||
@@ -18,8 +18,8 @@ class C(val myArg1: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
public object User {
|
||||
public fun main() {
|
||||
object User {
|
||||
fun main() {
|
||||
val c1 = C(100, 100, 100)
|
||||
val c2 = C(100, 100)
|
||||
val c3 = C(100)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
public class Test {
|
||||
class Test {
|
||||
private val s: String
|
||||
var b: Boolean = false
|
||||
var d: Double = 0.toDouble()
|
||||
internal var b: Boolean = false
|
||||
internal var d: Double = 0.toDouble()
|
||||
|
||||
public constructor() {
|
||||
constructor() {
|
||||
b = true
|
||||
}
|
||||
|
||||
public constructor(s: String) {
|
||||
constructor(s: String) {
|
||||
this.s = s
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
class C(arg1: Int, arg2: Int, arg3: Int) {
|
||||
internal class C internal constructor(arg1: Int, arg2: Int, arg3: Int) {
|
||||
|
||||
constructor(arg1: Int, arg2: Int) : this(arg1, arg2, 0) {
|
||||
internal constructor(arg1: Int, arg2: Int) : this(arg1, arg2, 0) {
|
||||
println()
|
||||
}
|
||||
|
||||
constructor(arg1: Int) : this(arg1, 0) {
|
||||
internal constructor(arg1: Int) : this(arg1, 0) {
|
||||
println()
|
||||
}
|
||||
}
|
||||
|
||||
public object User {
|
||||
public fun main() {
|
||||
object User {
|
||||
fun main() {
|
||||
val c1 = C(1, 2, 3)
|
||||
val c2 = C(5, 6)
|
||||
val c3 = C(7)
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import javaApi.Anon5
|
||||
|
||||
class A
|
||||
internal class A
|
||||
Anon5(10)
|
||||
constructor(private val a: Int, private val b: Int) {
|
||||
|
||||
Deprecated("") // this constructor will not be replaced by default parameter value in primary because of this annotation
|
||||
public constructor(a: Int) : this(a, 1) {
|
||||
constructor(a: Int) : this(a, 1) {
|
||||
}
|
||||
}
|
||||
|
||||
class B Anon5(11)
|
||||
internal class B Anon5(11)
|
||||
constructor()
|
||||
|
||||
class C Anon5(12)
|
||||
internal class C Anon5(12)
|
||||
private constructor()
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.test.customer
|
||||
|
||||
class Customer(public val firstName: String, public val lastName: String) {
|
||||
internal class Customer internal constructor(val firstName: String, val lastName: String) {
|
||||
|
||||
init {
|
||||
doSmthBefore()
|
||||
@@ -14,27 +14,27 @@ class Customer(public val firstName: String, public val lastName: String) {
|
||||
}
|
||||
}
|
||||
|
||||
class CustomerBuilder {
|
||||
public var _firstName: String = "Homer"
|
||||
public var _lastName: String = "Simpson"
|
||||
internal class CustomerBuilder {
|
||||
var _firstName: String = "Homer"
|
||||
var _lastName: String = "Simpson"
|
||||
|
||||
public fun WithFirstName(firstName: String): CustomerBuilder {
|
||||
fun WithFirstName(firstName: String): CustomerBuilder {
|
||||
_firstName = firstName
|
||||
return this
|
||||
}
|
||||
|
||||
public fun WithLastName(lastName: String): CustomerBuilder {
|
||||
fun WithLastName(lastName: String): CustomerBuilder {
|
||||
_lastName = lastName
|
||||
return this
|
||||
}
|
||||
|
||||
public fun Build(): Customer {
|
||||
fun Build(): Customer {
|
||||
return Customer(_firstName, _lastName)
|
||||
}
|
||||
}
|
||||
|
||||
public object User {
|
||||
public fun main() {
|
||||
object User {
|
||||
fun main() {
|
||||
val customer = CustomerBuilder().WithFirstName("Homer").WithLastName("Simpson").Build()
|
||||
println(customer.firstName)
|
||||
println(customer.lastName)
|
||||
|
||||
@@ -1 +1 @@
|
||||
class C(private val p1: Int, private val myP2: Int, public var p3: Int)
|
||||
internal class C(private val p1: Int, private val myP2: Int, var p3: Int)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class C(private val field: Int) {
|
||||
internal class C(private val field: Int) {
|
||||
|
||||
init {
|
||||
println(field)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class C(p: Int) {
|
||||
internal class C(p: Int) {
|
||||
private val p: Int
|
||||
|
||||
init {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class C(p: Int, c: C) {
|
||||
public var p: Int = 0
|
||||
internal class C(p: Int, c: C) {
|
||||
var p: Int = 0
|
||||
|
||||
init {
|
||||
c.p = p
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class C(p: Int) {
|
||||
public var p: Int = 0
|
||||
internal class C(p: Int) {
|
||||
var p: Int = 0
|
||||
|
||||
init {
|
||||
this.p = 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class C(x: String) {
|
||||
public var x: Any
|
||||
internal class C(x: String) {
|
||||
var x: Any
|
||||
|
||||
init {
|
||||
this.x = x
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class C(x: Any, b: Boolean) {
|
||||
public var x: Any
|
||||
internal class C(x: Any, b: Boolean) {
|
||||
var x: Any
|
||||
|
||||
init {
|
||||
if (b) {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
open class Base(o: Any, l: Int)
|
||||
internal open class Base internal constructor(o: Any, l: Int)
|
||||
|
||||
class C(private val string: String) : Base(string, string.length())
|
||||
internal class C(private val string: String) : Base(string, string.length())
|
||||
|
||||
@@ -1 +1 @@
|
||||
class C JvmOverloads constructor(private val string: String, a: Int = string.length())
|
||||
internal class C JvmOverloads constructor(private val string: String, a: Int = string.length())
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
import java.lang.SuppressWarnings
|
||||
|
||||
class C(Deprecated("") private val p1: Int, Deprecated("") private val myP2: Int, Deprecated("") SuppressWarnings("x") public var p3: Int)
|
||||
internal class C(Deprecated("") private val p1: Int, Deprecated("") private val myP2: Int, Deprecated("") SuppressWarnings("x") var p3: Int)
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
public class Identifier<T> {
|
||||
public val name: T
|
||||
class Identifier<T> {
|
||||
val name: T
|
||||
private val myHasDollar: Boolean
|
||||
private var myNullable = true
|
||||
|
||||
public constructor(name: T) {
|
||||
constructor(name: T) {
|
||||
this.name = name
|
||||
}
|
||||
|
||||
public constructor(name: T, isNullable: Boolean) {
|
||||
constructor(name: T, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myNullable = isNullable
|
||||
}
|
||||
|
||||
public constructor(name: T, hasDollar: Boolean, isNullable: Boolean) {
|
||||
constructor(name: T, hasDollar: Boolean, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myHasDollar = hasDollar
|
||||
myNullable = isNullable
|
||||
}
|
||||
}
|
||||
|
||||
public object User {
|
||||
public fun main() {
|
||||
object User {
|
||||
fun main() {
|
||||
val i1 = Identifier("name", false, true)
|
||||
val i2 = Identifier("name", false)
|
||||
val i3 = Identifier("name")
|
||||
|
||||
+7
-7
@@ -1,27 +1,27 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
public class Identifier {
|
||||
public val name: String
|
||||
class Identifier {
|
||||
val name: String
|
||||
private val myHasDollar: Boolean
|
||||
private var myNullable = true
|
||||
|
||||
public constructor(name: String) {
|
||||
constructor(name: String) {
|
||||
this.name = name
|
||||
}
|
||||
|
||||
public constructor(name: String, isNullable: Boolean) {
|
||||
constructor(name: String, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myNullable = isNullable
|
||||
}
|
||||
|
||||
public constructor(name: String, hasDollar: Boolean, isNullable: Boolean) {
|
||||
constructor(name: String, hasDollar: Boolean, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myHasDollar = hasDollar
|
||||
myNullable = isNullable
|
||||
}
|
||||
}
|
||||
|
||||
public object User {
|
||||
public fun main() {
|
||||
object User {
|
||||
fun main() {
|
||||
val i1 = Identifier("name", false, true)
|
||||
val i2 = Identifier("name", false)
|
||||
val i3 = Identifier("name")
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
class C1(arg1: Int,
|
||||
arg2: Int,
|
||||
arg3: Int) {
|
||||
internal class C1 internal constructor(arg1: Int,
|
||||
arg2: Int,
|
||||
arg3: Int) {
|
||||
|
||||
constructor(x: Int,
|
||||
y: Int) : this(x, x + y, 0) {
|
||||
internal constructor(x: Int,
|
||||
y: Int) : this(x, x + y, 0) {
|
||||
}
|
||||
}
|
||||
|
||||
class C2(private val arg1: Int,
|
||||
private val arg2: Int,
|
||||
arg3: Int)
|
||||
internal class C2 internal constructor(private val arg1: Int,
|
||||
private val arg2: Int,
|
||||
arg3: Int)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
class C(private val arg1: Int, private val arg2: Int, private val arg3: Int) {
|
||||
internal class C internal constructor(private val arg1: Int, private val arg2: Int, private val arg3: Int) {
|
||||
|
||||
fun foo(p: Int): Int {
|
||||
internal fun foo(p: Int): Int {
|
||||
return p
|
||||
}
|
||||
|
||||
constructor(arg1: Int, arg2: Int, other: C) : this(arg1, arg2, 0) {
|
||||
internal constructor(arg1: Int, arg2: Int, other: C) : this(arg1, arg2, 0) {
|
||||
println(foo(1) + this.foo(2) + other.foo(3) + staticFoo(4) + C.staticFoo(5))
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class C(private val arg1: Int, private val arg2: Int, private val arg3: Int) {
|
||||
return p
|
||||
}
|
||||
|
||||
public fun staticFoo2(): Int {
|
||||
fun staticFoo2(): Int {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
class A JvmOverloads constructor(nested: A.Nested = A.Nested(A.Nested.FIELD)) {
|
||||
internal class A JvmOverloads internal constructor(nested: A.Nested = A.Nested(A.Nested.FIELD)) {
|
||||
|
||||
class Nested(p: Int) {
|
||||
internal class Nested internal constructor(p: Int) {
|
||||
companion object {
|
||||
|
||||
public val FIELD: Int = 0
|
||||
val FIELD: Int = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
import A.Nested
|
||||
|
||||
class A JvmOverloads constructor(nested: Nested = Nested(Nested.FIELD)) {
|
||||
internal class A JvmOverloads internal constructor(nested: Nested = Nested(Nested.FIELD)) {
|
||||
|
||||
class Nested(p: Int) {
|
||||
internal class Nested internal constructor(p: Int) {
|
||||
companion object {
|
||||
|
||||
public val FIELD: Int = 0
|
||||
val FIELD: Int = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
var nested: Nested
|
||||
internal class B {
|
||||
internal var nested: Nested
|
||||
}
|
||||
+5
-5
@@ -3,16 +3,16 @@ package pack
|
||||
|
||||
import pack.A.Nested
|
||||
|
||||
class A JvmOverloads constructor(nested: Nested = Nested(Nested.FIELD)) {
|
||||
internal class A JvmOverloads internal constructor(nested: Nested = Nested(Nested.FIELD)) {
|
||||
|
||||
class Nested(p: Int) {
|
||||
internal class Nested internal constructor(p: Int) {
|
||||
companion object {
|
||||
|
||||
public val FIELD: Int = 0
|
||||
val FIELD: Int = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
var nested: Nested
|
||||
internal class B {
|
||||
internal var nested: Nested
|
||||
}
|
||||
+5
-5
@@ -3,16 +3,16 @@ package pack
|
||||
|
||||
import pack.A.*
|
||||
|
||||
class A JvmOverloads constructor(nested: Nested = Nested(Nested.FIELD)) {
|
||||
internal class A JvmOverloads internal constructor(nested: Nested = Nested(Nested.FIELD)) {
|
||||
|
||||
class Nested(p: Int) {
|
||||
internal class Nested internal constructor(p: Int) {
|
||||
companion object {
|
||||
|
||||
public val FIELD: Int = 0
|
||||
val FIELD: Int = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
var nested: Nested
|
||||
internal class B {
|
||||
internal var nested: Nested
|
||||
}
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
open class Base(nested: Base.Nested) {
|
||||
internal open class Base internal constructor(nested: Base.Nested) {
|
||||
|
||||
class Nested(p: Int) {
|
||||
internal class Nested internal constructor(p: Int) {
|
||||
companion object {
|
||||
|
||||
public val FIELD: Int = 0
|
||||
val FIELD: Int = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base(Base.Nested(Base.Nested.FIELD))
|
||||
internal class Derived internal constructor() : Base(Base.Nested(Base.Nested.FIELD))
|
||||
+7
-7
@@ -1,20 +1,20 @@
|
||||
open class Base
|
||||
internal open class Base
|
||||
|
||||
class C : Base {
|
||||
constructor(arg1: Int, arg2: Int, arg3: Int) {
|
||||
internal class C : Base {
|
||||
internal constructor(arg1: Int, arg2: Int, arg3: Int) {
|
||||
}
|
||||
|
||||
constructor(arg1: Int, arg2: Int) : this(arg1, arg2, 0) {
|
||||
internal constructor(arg1: Int, arg2: Int) : this(arg1, arg2, 0) {
|
||||
println()
|
||||
}
|
||||
|
||||
constructor(arg: Int) {
|
||||
internal constructor(arg: Int) {
|
||||
println(arg)
|
||||
}
|
||||
}
|
||||
|
||||
public object User {
|
||||
public fun main() {
|
||||
object User {
|
||||
fun main() {
|
||||
val c1 = C(1, 2, 3)
|
||||
val c2 = C(5, 6)
|
||||
val c3 = C(7)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package pack
|
||||
|
||||
class C JvmOverloads constructor(a: Int = 0, b: Int = 0, c: Int = 0, d: Int = 0, e: Int = 0) {
|
||||
internal class C JvmOverloads internal constructor(a: Int = 0, b: Int = 0, c: Int = 0, d: Int = 0, e: Int = 0) {
|
||||
|
||||
constructor(a: Int) : this(a, 0, 0, 0, 1) {
|
||||
internal constructor(a: Int) : this(a, 0, 0, 0, 1) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package pack
|
||||
|
||||
class C JvmOverloads constructor(a: Int = 0, b: Int = 0, c: Int = 0, d: Int = 0, e: Int = 0) {
|
||||
internal class C JvmOverloads internal constructor(a: Int = 0, b: Int = 0, c: Int = 0, d: Int = 0, e: Int = 0) {
|
||||
|
||||
constructor(a1: Int, b1: Int, c1: Int) : this(a1, b1, c1, 0, 0) {
|
||||
internal constructor(a1: Int, b1: Int, c1: Int) : this(a1, b1, c1, 0, 0) {
|
||||
}
|
||||
|
||||
constructor(b: Byte) : this(b.toInt(), 0, 0, 0, 0) {
|
||||
internal constructor(b: Byte) : this(b.toInt(), 0, 0, 0, 0) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package pack
|
||||
|
||||
class C JvmOverloads constructor(a: Int = 0, b: Int = 0, c: Int = 0, d: Int = 0, e: Int = 0) {
|
||||
internal class C JvmOverloads internal constructor(a: Int = 0, b: Int = 0, c: Int = 0, d: Int = 0, e: Int = 0) {
|
||||
|
||||
constructor(a: Int, b: Int, c: Int) : this(b, a, c, 0, 0) {
|
||||
internal constructor(a: Int, b: Int, c: Int) : this(b, a, c, 0, 0) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package pack
|
||||
|
||||
class C JvmOverloads constructor(a: Int = 1, b: Int = 2, c: Int = 3, d: Int = 4, e: Int = 5)
|
||||
internal class C JvmOverloads internal constructor(a: Int = 1, b: Int = 2, c: Int = 3, d: Int = 4, e: Int = 5)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package pack
|
||||
|
||||
class C JvmOverloads constructor(a: Int = 1, b: Int = 2, c: Int = 3, d: Int = 4, e: Int = 5)
|
||||
internal class C JvmOverloads internal constructor(a: Int = 1, b: Int = 2, c: Int = 3, d: Int = 4, e: Int = 5)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user