Converter:
Omit Unit return type Refactor handling of Unit type: extract separate object UnitType
This commit is contained in:
@@ -18,6 +18,7 @@ package org.jetbrains.jet.j2k.ast
|
|||||||
|
|
||||||
import org.jetbrains.jet.j2k.ast.types.Type
|
import org.jetbrains.jet.j2k.ast.types.Type
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
|
import org.jetbrains.jet.j2k.ast.types.isUnit
|
||||||
|
|
||||||
public open class Function(val name: Identifier,
|
public open class Function(val name: Identifier,
|
||||||
val docComments: List<Node>,
|
val docComments: List<Node>,
|
||||||
@@ -45,7 +46,7 @@ public open class Function(val name: Identifier,
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun modifiersToKotlin(): String {
|
private fun modifiersToKotlin(): String {
|
||||||
val modifierList = ArrayList<Modifier>()
|
val modifierList = ArrayList<Modifier>()
|
||||||
val accessModifier = accessModifier()
|
val accessModifier = accessModifier()
|
||||||
if (accessModifier != null) {
|
if (accessModifier != null) {
|
||||||
@@ -74,13 +75,15 @@ public open class Function(val name: Identifier,
|
|||||||
return modifierList.toKotlin()
|
return modifierList.toKotlin()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun returnTypeToKotlin() = if (!`type`.isUnit()) " : " + `type`.toKotlin() + " " else " "
|
||||||
|
|
||||||
public override fun toKotlin(): String {
|
public override fun toKotlin(): String {
|
||||||
return docComments.toKotlin("\n", "", "\n") +
|
return docComments.toKotlin("\n", "", "\n") +
|
||||||
modifiersToKotlin() +
|
modifiersToKotlin() +
|
||||||
"fun " + name.toKotlin() +
|
"fun ${name.toKotlin()}${typeParametersToKotlin()}" +
|
||||||
typeParametersToKotlin() +
|
"(${params.toKotlin()})" +
|
||||||
"(" + params.toKotlin() + ") : " +
|
returnTypeToKotlin() +
|
||||||
`type`.toKotlin() + " " + typeParameterWhereToKotlin() +
|
typeParameterWhereToKotlin() +
|
||||||
block?.toKotlin()
|
block?.toKotlin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.jetbrains.jet.j2k.ast.Element
|
|||||||
import org.jetbrains.jet.j2k.Converter
|
import org.jetbrains.jet.j2k.Converter
|
||||||
|
|
||||||
public fun Type.isPrimitive(): Boolean = this is PrimitiveType
|
public fun Type.isPrimitive(): Boolean = this is PrimitiveType
|
||||||
|
public fun Type.isUnit(): Boolean = this == UnitType
|
||||||
|
|
||||||
public abstract class MayBeNullableType(nullable: Boolean, val converter: Converter): Type {
|
public abstract class MayBeNullableType(nullable: Boolean, val converter: Converter): Type {
|
||||||
override public val nullable: Boolean = !converter.settings.forceNotNullTypes && nullable
|
override public val nullable: Boolean = !converter.settings.forceNotNullTypes && nullable
|
||||||
@@ -30,6 +31,10 @@ public trait NotNullType : Type {
|
|||||||
get() = false
|
get() = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public object UnitType: NotNullType {
|
||||||
|
override fun toKotlin() = "Unit"
|
||||||
|
}
|
||||||
|
|
||||||
public trait Type : Element {
|
public trait Type : Element {
|
||||||
|
|
||||||
public val nullable: Boolean
|
public val nullable: Boolean
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public open class TypeVisitor(private val myConverter: Converter) : PsiTypeVisit
|
|||||||
public override fun visitPrimitiveType(primitiveType: PsiPrimitiveType?): Type {
|
public override fun visitPrimitiveType(primitiveType: PsiPrimitiveType?): Type {
|
||||||
val name: String = primitiveType?.getCanonicalText()!!
|
val name: String = primitiveType?.getCanonicalText()!!
|
||||||
if (name == "void") {
|
if (name == "void") {
|
||||||
myResult = PrimitiveType(Identifier("Unit"))
|
myResult = UnitType
|
||||||
}
|
}
|
||||||
else if (PRIMITIVE_TYPES_NAMES.contains(name)) {
|
else if (PRIMITIVE_TYPES_NAMES.contains(name)) {
|
||||||
myResult = PrimitiveType(Identifier(StringUtil.capitalize(name)))
|
myResult = PrimitiveType(Identifier(StringUtil.capitalize(name)))
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public abstract class AbstractJavaToKotlinConverterTest(val kotlinFileExtension:
|
|||||||
private fun statementToKotlin(converter: Converter, text: String?): String {
|
private fun statementToKotlin(converter: Converter, text: String?): String {
|
||||||
var result = methodToKotlin(converter, "void main() {" + text + "}")
|
var result = methodToKotlin(converter, "void main() {" + text + "}")
|
||||||
val pos = result.lastIndexOf("}")
|
val pos = result.lastIndexOf("}")
|
||||||
result = result.substring(0, pos).replaceFirst("fun main\\(\\) : Unit \\{", "")
|
result = result.substring(0, pos).replaceFirst("fun main\\(\\) \\{", "")
|
||||||
return prettify(result)
|
return prettify(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package test
|
package test
|
||||||
public open class Test(str : String) {
|
public open class Test(str : String) {
|
||||||
var myStr : String = "String2"
|
var myStr : String = "String2"
|
||||||
public open fun sout(str : String) : Unit {
|
public open fun sout(str : String) {
|
||||||
System.out.println(str)
|
System.out.println(str)
|
||||||
}
|
}
|
||||||
public open fun dummy(str : String) : String {
|
public open fun dummy(str : String) : String {
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
public open fun test() : Unit {
|
public open fun test() {
|
||||||
sout("String")
|
sout("String")
|
||||||
val test = "String2"
|
val test = "String2"
|
||||||
sout(test)
|
sout(test)
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package test
|
package test
|
||||||
public open class Test(str : String) {
|
public open class Test(str : String) {
|
||||||
var myStr : String = "String2"
|
var myStr : String = "String2"
|
||||||
public open fun sout(str : String) : Unit {
|
public open fun sout(str : String) {
|
||||||
System.out?.println(str)
|
System.out?.println(str)
|
||||||
}
|
}
|
||||||
public open fun dummy(str : String) : String {
|
public open fun dummy(str : String) : String {
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
public open fun test() : Unit {
|
public open fun test() {
|
||||||
sout("String")
|
sout("String")
|
||||||
var test : String = "String2"
|
var test : String = "String2"
|
||||||
sout(test)
|
sout(test)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package test
|
package test
|
||||||
open class Foo() {
|
open class Foo() {
|
||||||
open fun execute() : Unit {
|
open fun execute() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class Bar() {
|
open class Bar() {
|
||||||
@@ -8,7 +8,7 @@ var fooNotNull : Foo = Foo()
|
|||||||
var fooNullable : Foo = null
|
var fooNullable : Foo = null
|
||||||
}
|
}
|
||||||
open class Test() {
|
open class Test() {
|
||||||
public open fun test(barNotNull : Bar, barNullable : Bar) : Unit {
|
public open fun test(barNotNull : Bar, barNullable : Bar) {
|
||||||
barNotNull.fooNotNull.execute()
|
barNotNull.fooNotNull.execute()
|
||||||
barNotNull.fooNullable.execute()
|
barNotNull.fooNullable.execute()
|
||||||
barNullable.fooNotNull.execute()
|
barNullable.fooNotNull.execute()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package test
|
package test
|
||||||
open class Foo() {
|
open class Foo() {
|
||||||
open fun execute() : Unit {
|
open fun execute() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class Bar() {
|
open class Bar() {
|
||||||
@@ -8,7 +8,7 @@ var fooNotNull : Foo = Foo()
|
|||||||
var fooNullable : Foo? = null
|
var fooNullable : Foo? = null
|
||||||
}
|
}
|
||||||
open class Test() {
|
open class Test() {
|
||||||
public open fun test(barNotNull : Bar, barNullable : Bar?) : Unit {
|
public open fun test(barNotNull : Bar, barNullable : Bar?) {
|
||||||
barNotNull.fooNotNull.execute()
|
barNotNull.fooNotNull.execute()
|
||||||
barNotNull.fooNullable?.execute()
|
barNotNull.fooNullable?.execute()
|
||||||
barNullable?.fooNotNull?.execute()
|
barNullable?.fooNotNull?.execute()
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
fun fromArrayToCollection(a : Array<Foo>) : Unit {
|
fun fromArrayToCollection(a : Array<Foo>) {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun fromArrayToCollection(a : Array<Foo?>?) : Unit {
|
fun fromArrayToCollection(a : Array<Foo?>?) {
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import java.util.BitSet
|
import java.util.BitSet
|
||||||
open class Foo() {
|
open class Foo() {
|
||||||
open fun foo(o : BitSet) : Unit {
|
open fun foo(o : BitSet) {
|
||||||
val o2 = o
|
val o2 = o
|
||||||
val foo = 0
|
val foo = 0
|
||||||
foo = o2.size()
|
foo = o2.size()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import java.util.BitSet
|
import java.util.BitSet
|
||||||
open class Foo() {
|
open class Foo() {
|
||||||
open fun foo(o : BitSet?) : Unit {
|
open fun foo(o : BitSet?) {
|
||||||
var o2 : BitSet? = o
|
var o2 : BitSet? = o
|
||||||
var foo : Int = 0
|
var foo : Int = 0
|
||||||
foo = o2?.size()!!
|
foo = o2?.size()!!
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
open class Boxing() {
|
open class Boxing() {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
val i = 0
|
val i = 0
|
||||||
val n = 0.0.toFloat()
|
val n = 0.0.toFloat()
|
||||||
i = 1
|
i = 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
open class Boxing() {
|
open class Boxing() {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
var i : Int? = 0
|
var i : Int? = 0
|
||||||
var n : Number? = 0.0.toFloat()
|
var n : Number? = 0.0.toFloat()
|
||||||
i = 1
|
i = 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
val i = Integer.valueOf(100)
|
val i = Integer.valueOf(100)
|
||||||
val s = 3
|
val s = 3
|
||||||
val ss = java.lang.Short.valueOf(s)
|
val ss = java.lang.Short.valueOf(s)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
var i : Int? = Integer.valueOf(100)
|
var i : Int? = Integer.valueOf(100)
|
||||||
var s : Short = 3
|
var s : Short = 3
|
||||||
var ss : Short? = java.lang.Short.valueOf(s)
|
var ss : Short? = java.lang.Short.valueOf(s)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ val ourOut : java.io.PrintStream = 0
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
Library.ourOut.print()
|
Library.ourOut.print()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ val ourOut : java.io.PrintStream? = null
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
Library.ourOut?.print()
|
Library.ourOut?.print()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
open class Library() {
|
open class Library() {
|
||||||
class object {
|
class object {
|
||||||
open fun call() : Unit {
|
open fun call() {
|
||||||
}
|
}
|
||||||
open fun getString() : String {
|
open fun getString() : String {
|
||||||
return ""
|
return ""
|
||||||
@@ -8,7 +8,7 @@ return ""
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
Library.call()
|
Library.call()
|
||||||
Library.getString().isEmpty()
|
Library.getString().isEmpty()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
open class Library() {
|
open class Library() {
|
||||||
class object {
|
class object {
|
||||||
open fun call() : Unit {
|
open fun call() {
|
||||||
}
|
}
|
||||||
open fun getString() : String? {
|
open fun getString() : String? {
|
||||||
return ""
|
return ""
|
||||||
@@ -8,7 +8,7 @@ return ""
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
Library.call()
|
Library.call()
|
||||||
Library.getString()?.isEmpty()
|
Library.getString()?.isEmpty()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
open class Library() {
|
open class Library() {
|
||||||
open fun call() : Unit {
|
open fun call() {
|
||||||
}
|
}
|
||||||
open fun getString() : String {
|
open fun getString() : String {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
val lib = Library()
|
val lib = Library()
|
||||||
lib.call()
|
lib.call()
|
||||||
lib.getString().isEmpty()
|
lib.getString().isEmpty()
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
open class Library() {
|
open class Library() {
|
||||||
open fun call() : Unit {
|
open fun call() {
|
||||||
}
|
}
|
||||||
open fun getString() : String? {
|
open fun getString() : String? {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
var lib : Library? = Library()
|
var lib : Library? = Library()
|
||||||
lib?.call()
|
lib?.call()
|
||||||
lib?.getString()?.isEmpty()
|
lib?.getString()?.isEmpty()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ open class Library() {
|
|||||||
public val myString : String = 0
|
public val myString : String = 0
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
Library.myString.isEmpty()
|
Library.myString.isEmpty()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ open class Library() {
|
|||||||
public val myString : String? = null
|
public val myString : String? = null
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
Library.myString?.isEmpty()
|
Library.myString?.isEmpty()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ return Short()
|
|||||||
}
|
}
|
||||||
open class Test() {
|
open class Test() {
|
||||||
class object {
|
class object {
|
||||||
public open fun test() : Unit {
|
public open fun test() {
|
||||||
test.Short.valueOf("1")
|
test.Short.valueOf("1")
|
||||||
test.Short.valueOf("1")
|
test.Short.valueOf("1")
|
||||||
java.lang.Short.valueOf("1")
|
java.lang.Short.valueOf("1")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ return Short()
|
|||||||
}
|
}
|
||||||
open class Test() {
|
open class Test() {
|
||||||
class object {
|
class object {
|
||||||
public open fun test() : Unit {
|
public open fun test() {
|
||||||
test.Short.valueOf("1")
|
test.Short.valueOf("1")
|
||||||
test.Short.valueOf("1")
|
test.Short.valueOf("1")
|
||||||
java.lang.Short.valueOf("1")
|
java.lang.Short.valueOf("1")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
abstract class A() {
|
abstract class A() {
|
||||||
abstract fun callme() : Unit
|
abstract fun callme()
|
||||||
open fun callmetoo() : Unit {
|
open fun callmetoo() {
|
||||||
print("This is a concrete method.")
|
print("This is a concrete method.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
abstract class A() {
|
abstract class A() {
|
||||||
abstract fun callme() : Unit
|
abstract fun callme()
|
||||||
open fun callmetoo() : Unit {
|
open fun callmetoo() {
|
||||||
print("This is a concrete method.")
|
print("This is a concrete method.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
abstract class Shape() {
|
abstract class Shape() {
|
||||||
public var color : String = 0
|
public var color : String = 0
|
||||||
public open fun setColor(c : String) : Unit {
|
public open fun setColor(c : String) {
|
||||||
color = c
|
color = c
|
||||||
}
|
}
|
||||||
public open fun getColor() : String {
|
public open fun getColor() : String {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
abstract class Shape() {
|
abstract class Shape() {
|
||||||
public var color : String? = null
|
public var color : String? = null
|
||||||
public open fun setColor(c : String?) : Unit {
|
public open fun setColor(c : String?) {
|
||||||
color = c
|
color = c
|
||||||
}
|
}
|
||||||
public open fun getColor() : String? {
|
public open fun getColor() : String? {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class T() {
|
class T() {
|
||||||
fun main() : Unit {
|
fun main() {
|
||||||
}
|
}
|
||||||
fun i() : Int {
|
fun i() : Int {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class T() {
|
class T() {
|
||||||
fun main() : Unit {
|
fun main() {
|
||||||
}
|
}
|
||||||
fun i() : Int {
|
fun i() : Int {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ return __
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
val m = HashMap(1)
|
val m = HashMap(1)
|
||||||
val m2 = HashMap(10)
|
val m2 = HashMap(10)
|
||||||
val t1 = Test.init()
|
val t1 = Test.init()
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ return __
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class User() {
|
open class User() {
|
||||||
open fun main() : Unit {
|
open fun main() {
|
||||||
var m : HashMap<Any?, Any?>? = HashMap(1)
|
var m : HashMap<Any?, Any?>? = HashMap(1)
|
||||||
var m2 : HashMap<Any?, Any?>? = HashMap(10)
|
var m2 : HashMap<Any?, Any?>? = HashMap(10)
|
||||||
var t1 : Test? = Test.init()
|
var t1 : Test? = Test.init()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
public open class MyClass() {
|
public open class MyClass() {
|
||||||
private fun init(arg1 : Int, arg2 : Int, arg3 : Int) : Unit {
|
private fun init(arg1 : Int, arg2 : Int, arg3 : Int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
public open class MyClass() {
|
public open class MyClass() {
|
||||||
private fun init(arg1 : Int, arg2 : Int, arg3 : Int) : Unit {
|
private fun init(arg1 : Int, arg2 : Int, arg3 : Int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
val c1 = C(100, 100, 100)
|
val c1 = C(100, 100, 100)
|
||||||
val c2 = C.init(100, 100)
|
val c2 = C.init(100, 100)
|
||||||
val c3 = C.init(100)
|
val c3 = C.init(100)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
var c1 : C? = C(100, 100, 100)
|
var c1 : C? = C(100, 100, 100)
|
||||||
var c2 : C? = C.init(100, 100)
|
var c2 : C? = C.init(100, 100)
|
||||||
var c3 : C? = C.init(100)
|
var c3 : C? = C.init(100)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
val c1 = C.init(100, 100, 100)
|
val c1 = C.init(100, 100, 100)
|
||||||
val c2 = C.init(100, 100)
|
val c2 = C.init(100, 100)
|
||||||
val c3 = C(100)
|
val c3 = C(100)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
var c1 : C? = C.init(100, 100, 100)
|
var c1 : C? = C.init(100, 100, 100)
|
||||||
var c2 : C? = C.init(100, 100)
|
var c2 : C? = C.init(100, 100)
|
||||||
var c3 : C? = C(100)
|
var c3 : C? = C(100)
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ return _firstName
|
|||||||
public open fun getLastName() : String {
|
public open fun getLastName() : String {
|
||||||
return _lastName
|
return _lastName
|
||||||
}
|
}
|
||||||
private fun doSmthBefore() : Unit {
|
private fun doSmthBefore() {
|
||||||
}
|
}
|
||||||
private fun doSmthAfter() : Unit {
|
private fun doSmthAfter() {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
doSmthBefore()
|
doSmthBefore()
|
||||||
@@ -36,7 +36,7 @@ return Customer(_firstName, _lastName)
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
val customer = CustomerBuilder().WithFirstName("Homer").WithLastName("Simpson").Build()
|
val customer = CustomerBuilder().WithFirstName("Homer").WithLastName("Simpson").Build()
|
||||||
System.out.println(customer.getFirstName())
|
System.out.println(customer.getFirstName())
|
||||||
System.out.println(customer.getLastName())
|
System.out.println(customer.getLastName())
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ return _firstName
|
|||||||
public open fun getLastName() : String? {
|
public open fun getLastName() : String? {
|
||||||
return _lastName
|
return _lastName
|
||||||
}
|
}
|
||||||
private fun doSmthBefore() : Unit {
|
private fun doSmthBefore() {
|
||||||
}
|
}
|
||||||
private fun doSmthAfter() : Unit {
|
private fun doSmthAfter() {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
doSmthBefore()
|
doSmthBefore()
|
||||||
@@ -36,7 +36,7 @@ return Customer(_firstName, _lastName)
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
var customer : Customer? = CustomerBuilder().WithFirstName("Homer")?.WithLastName("Simpson")?.Build()
|
var customer : Customer? = CustomerBuilder().WithFirstName("Homer")?.WithLastName("Simpson")?.Build()
|
||||||
System.out?.println(customer?.getFirstName())
|
System.out?.println(customer?.getFirstName())
|
||||||
System.out?.println(customer?.getLastName())
|
System.out?.println(customer?.getLastName())
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
val i1 = Identifier.init<String>("name", false, true)
|
val i1 = Identifier.init<String>("name", false, true)
|
||||||
val i2 = Identifier.init<String>("name", false)
|
val i2 = Identifier.init<String>("name", false)
|
||||||
val i3 = Identifier.init<String>("name")
|
val i3 = Identifier.init<String>("name")
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
var i1 : Identifier<*>? = Identifier.init<String?>("name", false, true)
|
var i1 : Identifier<*>? = Identifier.init<String?>("name", false, true)
|
||||||
var i2 : Identifier<*>? = Identifier.init<String?>("name", false)
|
var i2 : Identifier<*>? = Identifier.init<String?>("name", false)
|
||||||
var i3 : Identifier<*>? = Identifier.init<String?>("name")
|
var i3 : Identifier<*>? = Identifier.init<String?>("name")
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
val i1 = Identifier.init("name", false, true)
|
val i1 = Identifier.init("name", false, true)
|
||||||
val i2 = Identifier.init("name", false)
|
val i2 = Identifier.init("name", false)
|
||||||
val i3 = Identifier.init("name")
|
val i3 = Identifier.init("name")
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
var i1 : Identifier? = Identifier.init("name", false, true)
|
var i1 : Identifier? = Identifier.init("name", false, true)
|
||||||
var i2 : Identifier? = Identifier.init("name", false)
|
var i2 : Identifier? = Identifier.init("name", false)
|
||||||
var i3 : Identifier? = Identifier.init("name")
|
var i3 : Identifier? = Identifier.init("name")
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ return ""
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
val t = Test.init("name")
|
val t = Test.init("name")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ return ""
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main() : Unit {
|
public open fun main() {
|
||||||
var t : Test? = Test.init("name")
|
var t : Test? = Test.init("name")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
enum class E {
|
enum class E {
|
||||||
FOO
|
FOO
|
||||||
fun foo() : Unit {
|
fun foo() {
|
||||||
FOO.toString()
|
FOO.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
enum class E {
|
enum class E {
|
||||||
FOO
|
FOO
|
||||||
fun foo() : Unit {
|
fun foo() {
|
||||||
FOO.toString()
|
FOO.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ BLACK
|
|||||||
RED
|
RED
|
||||||
YELLOW
|
YELLOW
|
||||||
BLUE
|
BLUE
|
||||||
public override fun run() : Unit {
|
public override fun run() {
|
||||||
System.out.println("name()=" + name() + ", toString()=" + toString())
|
System.out.println("name()=" + name() + ", toString()=" + toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ BLACK
|
|||||||
RED
|
RED
|
||||||
YELLOW
|
YELLOW
|
||||||
BLUE
|
BLUE
|
||||||
public override fun run() : Unit {
|
public override fun run() {
|
||||||
System.out?.println("name()=" + name() + ", toString()=" + toString())
|
System.out?.println("name()=" + name() + ", toString()=" + toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun main() : Unit {
|
fun main() {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun main() : Unit {
|
fun main() {
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ return super.clone()
|
|||||||
public override fun toString() : String {
|
public override fun toString() : String {
|
||||||
return super.toString()
|
return super.toString()
|
||||||
}
|
}
|
||||||
protected override fun finalize() : Unit {
|
protected override fun finalize() {
|
||||||
super.finalize()
|
super.finalize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ return super.clone()
|
|||||||
public open fun toString() : String {
|
public open fun toString() : String {
|
||||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||||
}
|
}
|
||||||
protected open fun finalize() : Unit {
|
protected open fun finalize() {
|
||||||
super.finalize()
|
super.finalize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ return super.clone()
|
|||||||
public override fun toString() : String? {
|
public override fun toString() : String? {
|
||||||
return super.toString()
|
return super.toString()
|
||||||
}
|
}
|
||||||
protected override fun finalize() : Unit {
|
protected override fun finalize() {
|
||||||
super.finalize()
|
super.finalize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ return super.clone()
|
|||||||
public open fun toString() : String? {
|
public open fun toString() : String? {
|
||||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||||
}
|
}
|
||||||
protected open fun finalize() : Unit {
|
protected open fun finalize() {
|
||||||
super.finalize()
|
super.finalize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
package demo
|
package demo
|
||||||
class Final() {
|
class Final() {
|
||||||
fun test() : Unit {
|
fun test() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
package demo
|
package demo
|
||||||
class Final() {
|
class Final() {
|
||||||
fun test() : Unit {
|
fun test() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun test() : Unit {
|
fun test() {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun test() : Unit {
|
fun test() {
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class object {
|
class object {
|
||||||
public fun main(args : Array<String>) : Unit {
|
public fun main(args : Array<String>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class object {
|
class object {
|
||||||
public fun main(args : Array<String?>?) : Unit {
|
public fun main(args : Array<String?>?) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
open class A() {
|
open class A() {
|
||||||
open fun a() : Unit {
|
open fun a() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class B() : A() {
|
class B() : A() {
|
||||||
override fun a() : Unit {
|
override fun a() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
open class A() {
|
open class A() {
|
||||||
open fun a() : Unit {
|
open fun a() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class B() : A() {
|
class B() : A() {
|
||||||
override fun a() : Unit {
|
override fun a() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
open class A() {
|
open class A() {
|
||||||
open fun foo() : Unit {
|
open fun foo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class B() : A() {
|
open class B() : A() {
|
||||||
override fun foo() : Unit {
|
override fun foo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class C() : B() {
|
open class C() : B() {
|
||||||
override fun foo() : Unit {
|
override fun foo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
open class A() {
|
open class A() {
|
||||||
open fun foo() : Unit {
|
open fun foo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class B() : A() {
|
open class B() : A() {
|
||||||
override fun foo() : Unit {
|
override fun foo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class C() : B() {
|
open class C() : B() {
|
||||||
override fun foo() : Unit {
|
override fun foo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ return super.clone()
|
|||||||
public open fun toString() : String {
|
public open fun toString() : String {
|
||||||
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
|
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
|
||||||
}
|
}
|
||||||
protected open fun finalize() : Unit {
|
protected open fun finalize() {
|
||||||
super.finalize()
|
super.finalize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ return super.clone()
|
|||||||
public open fun toString() : String? {
|
public open fun toString() : String? {
|
||||||
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
|
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
|
||||||
}
|
}
|
||||||
protected open fun finalize() : Unit {
|
protected open fun finalize() {
|
||||||
super.finalize()
|
super.finalize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun putU<U>(u : U) : Unit {
|
fun putU<U>(u : U) {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun putU<U>(u : U?) : Unit {
|
fun putU<U>(u : U?) {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun putUVW<U, V, W>(u : U, v : V, w : W) : Unit {
|
fun putUVW<U, V, W>(u : U, v : V, w : W) {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun putUVW<U, V, W>(u : U?, v : V?, w : W?) : Unit {
|
fun putUVW<U, V, W>(u : U?, v : V?, w : W?) {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
private fun test() : Unit {
|
private fun test() {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
private fun test() : Unit {
|
private fun test() {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
protected fun test() : Unit {
|
protected fun test() {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
protected fun test() : Unit {
|
protected fun test() {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
public fun test() : Unit {
|
public fun test() {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
public fun test() : Unit {
|
public fun test() {
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun test(vararg var args : Any) : Unit {
|
open fun test(vararg var args : Any) {
|
||||||
args = array<Int>(1, 2, 3)
|
args = array<Int>(1, 2, 3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun test(vararg var args : Any?) : Unit {
|
open fun test(vararg var args : Any?) {
|
||||||
args = array<Int?>(1, 2, 3)
|
args = array<Int?>(1, 2, 3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun popAll(dst : Collection<in E>) : Unit {
|
fun popAll(dst : Collection<in E>) {
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
fun popAll(dst : Collection<in E?>?) : Unit {
|
fun popAll(dst : Collection<in E?>?) {
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ private var i : Int = 0
|
|||||||
/**
|
/**
|
||||||
* This is a function doc comment.
|
* This is a function doc comment.
|
||||||
*/
|
*/
|
||||||
public open fun foo() : Unit {
|
public open fun foo() {
|
||||||
/* This is a function comment */
|
/* This is a function comment */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ private var i : Int = 0
|
|||||||
/**
|
/**
|
||||||
* This is a function doc comment.
|
* This is a function doc comment.
|
||||||
*/
|
*/
|
||||||
public open fun foo() : Unit {
|
public open fun foo() {
|
||||||
/* This is a function comment */
|
/* This is a function comment */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,11 +2,11 @@ import java.util.HashMap
|
|||||||
open class G<T : String>(t : T) {
|
open class G<T : String>(t : T) {
|
||||||
}
|
}
|
||||||
public open class Java() {
|
public open class Java() {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
val m = HashMap()
|
val m = HashMap()
|
||||||
m.put(1, 1)
|
m.put(1, 1)
|
||||||
}
|
}
|
||||||
open fun test2() : Unit {
|
open fun test2() {
|
||||||
val m = HashMap()
|
val m = HashMap()
|
||||||
val g = G("")
|
val g = G("")
|
||||||
val g2 = G<String>("")
|
val g2 = G<String>("")
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import java.util.HashMap
|
|||||||
open class G<T : String?>(t : T?) {
|
open class G<T : String?>(t : T?) {
|
||||||
}
|
}
|
||||||
public open class Java() {
|
public open class Java() {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
var m : HashMap<Any?, Any?>? = HashMap()
|
var m : HashMap<Any?, Any?>? = HashMap()
|
||||||
m?.put(1, 1)
|
m?.put(1, 1)
|
||||||
}
|
}
|
||||||
open fun test2() : Unit {
|
open fun test2() {
|
||||||
var m : HashMap<*, *>? = HashMap()
|
var m : HashMap<*, *>? = HashMap()
|
||||||
var g : G<String?>? = G("")
|
var g : G<String?>? = G("")
|
||||||
var g2 : G<String?>? = G<String?>("")
|
var g2 : G<String?>? = G<String?>("")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
class object {
|
class object {
|
||||||
open fun subListRangeCheck(fromIndex : Int, toIndex : Int, size : Int) : Unit {
|
open fun subListRangeCheck(fromIndex : Int, toIndex : Int, size : Int) {
|
||||||
if (fromIndex < 0)
|
if (fromIndex < 0)
|
||||||
throw IndexOutOfBoundsException("fromIndex = " + fromIndex)
|
throw IndexOutOfBoundsException("fromIndex = " + fromIndex)
|
||||||
if (toIndex > size)
|
if (toIndex > size)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
class object {
|
class object {
|
||||||
open fun subListRangeCheck(fromIndex : Int, toIndex : Int, size : Int) : Unit {
|
open fun subListRangeCheck(fromIndex : Int, toIndex : Int, size : Int) {
|
||||||
if (fromIndex < 0)
|
if (fromIndex < 0)
|
||||||
throw IndexOutOfBoundsException("fromIndex = " + fromIndex)
|
throw IndexOutOfBoundsException("fromIndex = " + fromIndex)
|
||||||
if (toIndex > size)
|
if (toIndex > size)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun putInt(i : Int) : Unit {
|
open fun putInt(i : Int) {
|
||||||
}
|
}
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
val b = 10
|
val b = 10
|
||||||
putInt(b.toInt())
|
putInt(b.toInt())
|
||||||
val b2 = 10
|
val b2 = 10
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun putInt(i : Int?) : Unit {
|
open fun putInt(i : Int?) {
|
||||||
}
|
}
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
var b : Byte = 10
|
var b : Byte = 10
|
||||||
putInt(b.toInt())
|
putInt(b.toInt())
|
||||||
var b2 : Byte? = 10
|
var b2 : Byte? = 10
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun putInt(i : Int) : Unit {
|
open fun putInt(i : Int) {
|
||||||
}
|
}
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
val i = 10
|
val i = 10
|
||||||
putInt(i)
|
putInt(i)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun putInt(i : Int?) : Unit {
|
open fun putInt(i : Int?) {
|
||||||
}
|
}
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
var i : Int = 10
|
var i : Int = 10
|
||||||
putInt(i)
|
putInt(i)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun putInt(i : Int) : Unit {
|
open fun putInt(i : Int) {
|
||||||
}
|
}
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
val b = 10
|
val b = 10
|
||||||
putInt(b.toInt())
|
putInt(b.toInt())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test() {
|
open class Test() {
|
||||||
open fun putInt(i : Int) : Unit {
|
open fun putInt(i : Int) {
|
||||||
}
|
}
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
var b : Byte = 10
|
var b : Byte = 10
|
||||||
putInt(b.toInt())
|
putInt(b.toInt())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main(args : Array<String>) : Unit {
|
public open fun main(args : Array<String>) {
|
||||||
val i1 = Identifier.init<String>("name", false, true)
|
val i1 = Identifier.init<String>("name", false, true)
|
||||||
val i2 = Identifier.init<String>("name", false)
|
val i2 = Identifier.init<String>("name", false)
|
||||||
val i3 = Identifier.init<String>("name")
|
val i3 = Identifier.init<String>("name")
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ return __
|
|||||||
}
|
}
|
||||||
public open class User() {
|
public open class User() {
|
||||||
class object {
|
class object {
|
||||||
public open fun main(args : Array<String?>?) : Unit {
|
public open fun main(args : Array<String?>?) {
|
||||||
var i1 : Identifier<*>? = Identifier.init<String?>("name", false, true)
|
var i1 : Identifier<*>? = Identifier.init<String?>("name", false, true)
|
||||||
var i2 : Identifier<*>? = Identifier.init<String?>("name", false)
|
var i2 : Identifier<*>? = Identifier.init<String?>("name", false)
|
||||||
var i3 : Identifier<*>? = Identifier.init<String?>("name")
|
var i3 : Identifier<*>? = Identifier.init<String?>("name")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test(i : Int) {
|
open class Test(i : Int) {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
val i = 10
|
val i = 10
|
||||||
Test(i)
|
Test(i)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test(i : Int?) {
|
open class Test(i : Int?) {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
var i : Int = 10
|
var i : Int = 10
|
||||||
Test(i)
|
Test(i)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test(i : Int) {
|
open class Test(i : Int) {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
val b = 10
|
val b = 10
|
||||||
Test(b.toInt())
|
Test(b.toInt())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo
|
package demo
|
||||||
open class Test(i : Int) {
|
open class Test(i : Int) {
|
||||||
open fun test() : Unit {
|
open fun test() {
|
||||||
var b : Byte = 10
|
var b : Byte = 10
|
||||||
Test(b.toInt())
|
Test(b.toInt())
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user