Converter tests:
White spaces in member lists are preserved
This commit is contained in:
@@ -2,12 +2,15 @@ package test
|
||||
|
||||
public class Test(str: String) {
|
||||
var myStr: String = "String2"
|
||||
|
||||
public fun sout(str: String) {
|
||||
System.out.println(str)
|
||||
}
|
||||
|
||||
public fun dummy(str: String): String {
|
||||
return str
|
||||
}
|
||||
|
||||
public fun test() {
|
||||
sout("String")
|
||||
val test = "String2"
|
||||
@@ -16,6 +19,7 @@ public class Test(str: String) {
|
||||
|
||||
Test(test)
|
||||
}
|
||||
|
||||
{
|
||||
myStr = str
|
||||
}
|
||||
|
||||
@@ -2,12 +2,15 @@ package test
|
||||
|
||||
public open class Test(str: String) {
|
||||
var myStr: String = "String2"
|
||||
|
||||
public open fun sout(str: String) {
|
||||
System.out?.println(str)
|
||||
}
|
||||
|
||||
public open fun dummy(str: String): String {
|
||||
return str
|
||||
}
|
||||
|
||||
public open fun test() {
|
||||
sout("String")
|
||||
var test: String = "String2"
|
||||
@@ -16,6 +19,7 @@ public open class Test(str: String) {
|
||||
|
||||
Test(test)
|
||||
}
|
||||
|
||||
{
|
||||
myStr = str
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Test() {
|
||||
var str: String = 0
|
||||
|
||||
class object {
|
||||
{
|
||||
str = "Ola"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
open class Test() {
|
||||
var str: String? = null
|
||||
|
||||
class object {
|
||||
{
|
||||
str = "Ola"
|
||||
|
||||
@@ -2,6 +2,7 @@ class Library() {
|
||||
class object {
|
||||
fun call() {
|
||||
}
|
||||
|
||||
fun getString(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ open class Library() {
|
||||
class object {
|
||||
open fun call() {
|
||||
}
|
||||
|
||||
open fun getString(): String? {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
class Library() {
|
||||
fun call() {
|
||||
}
|
||||
|
||||
fun getString(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
open class Library() {
|
||||
open fun call() {
|
||||
}
|
||||
|
||||
open fun getString(): String? {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
abstract class A() {
|
||||
abstract fun callme()
|
||||
|
||||
fun callmetoo() {
|
||||
print("This is a concrete method.")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
abstract class A() {
|
||||
abstract fun callme()
|
||||
|
||||
open fun callmetoo() {
|
||||
print("This is a concrete method.")
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ class S() {
|
||||
fun sB(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
class object {
|
||||
var myI: Int = 10
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ class S() {
|
||||
fun sB(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
class object {
|
||||
var myI: Int = 10
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ class S() {
|
||||
fun sB(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
class object {
|
||||
fun sI(): Int {
|
||||
return 1
|
||||
|
||||
@@ -2,6 +2,7 @@ class S() {
|
||||
fun sB(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
class object {
|
||||
fun sI(): Int {
|
||||
return 1
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
class C(arg1: Int, arg2: Int, arg3: Int) {
|
||||
class object {
|
||||
|
||||
fun init(arg1: Int, arg2: Int): C {
|
||||
val __ = C(arg1, arg2, 0)
|
||||
return __
|
||||
}
|
||||
|
||||
fun init(arg1: Int): C {
|
||||
val __ = C(arg1, 0, 0)
|
||||
return __
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
open class C(arg1: Int, arg2: Int, arg3: Int) {
|
||||
class object {
|
||||
|
||||
open fun init(arg1: Int, arg2: Int): C {
|
||||
val __ = C(arg1, arg2, 0)
|
||||
return __
|
||||
}
|
||||
|
||||
open fun init(arg1: Int): C {
|
||||
val __ = C(arg1, 0, 0)
|
||||
return __
|
||||
|
||||
@@ -2,18 +2,22 @@ class C(arg1: Int) {
|
||||
val myArg1: Int
|
||||
var myArg2: Int = 0
|
||||
var myArg3: Int = 0
|
||||
|
||||
{
|
||||
myArg1 = arg1
|
||||
myArg2 = 0
|
||||
myArg3 = 0
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
fun init(arg1: Int, arg2: Int, arg3: Int): C {
|
||||
val __ = C(arg1)
|
||||
__.myArg2 = arg2
|
||||
__.myArg3 = arg3
|
||||
return __
|
||||
}
|
||||
|
||||
fun init(arg1: Int, arg2: Int): C {
|
||||
val __ = C(arg1)
|
||||
__.myArg2 = arg2
|
||||
|
||||
@@ -2,18 +2,22 @@ open class C(arg1: Int) {
|
||||
val myArg1: Int
|
||||
var myArg2: Int = 0
|
||||
var myArg3: Int = 0
|
||||
|
||||
{
|
||||
myArg1 = arg1
|
||||
myArg2 = 0
|
||||
myArg3 = 0
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
open fun init(arg1: Int, arg2: Int, arg3: Int): C {
|
||||
val __ = C(arg1)
|
||||
__.myArg2 = arg2
|
||||
__.myArg3 = arg3
|
||||
return __
|
||||
}
|
||||
|
||||
open fun init(arg1: Int, arg2: Int): C {
|
||||
val __ = C(arg1)
|
||||
__.myArg2 = arg2
|
||||
|
||||
@@ -3,16 +3,20 @@ package org.test.customer
|
||||
class Customer(first: String, last: String) {
|
||||
public val _firstName: String
|
||||
public val _lastName: String
|
||||
|
||||
public fun getFirstName(): String {
|
||||
return _firstName
|
||||
}
|
||||
|
||||
public fun getLastName(): String {
|
||||
return _lastName
|
||||
}
|
||||
|
||||
private fun doSmthBefore() {
|
||||
}
|
||||
private fun doSmthAfter() {
|
||||
}
|
||||
|
||||
{
|
||||
doSmthBefore()
|
||||
_firstName = first
|
||||
@@ -23,14 +27,17 @@ class Customer(first: String, last: String) {
|
||||
class CustomerBuilder() {
|
||||
public var _firstName: String = "Homer"
|
||||
public var _lastName: String = "Simpson"
|
||||
|
||||
public fun WithFirstName(firstName: String): CustomerBuilder {
|
||||
_firstName = firstName
|
||||
return this
|
||||
}
|
||||
|
||||
public fun WithLastName(lastName: String): CustomerBuilder {
|
||||
_lastName = lastName
|
||||
return this
|
||||
}
|
||||
|
||||
public fun Build(): Customer {
|
||||
return Customer(_firstName, _lastName)
|
||||
}
|
||||
|
||||
@@ -3,16 +3,20 @@ package org.test.customer
|
||||
open class Customer(first: String?, last: String?) {
|
||||
public val _firstName: String?
|
||||
public val _lastName: String?
|
||||
|
||||
public open fun getFirstName(): String? {
|
||||
return _firstName
|
||||
}
|
||||
|
||||
public open fun getLastName(): String? {
|
||||
return _lastName
|
||||
}
|
||||
|
||||
private fun doSmthBefore() {
|
||||
}
|
||||
private fun doSmthAfter() {
|
||||
}
|
||||
|
||||
{
|
||||
doSmthBefore()
|
||||
_firstName = first
|
||||
@@ -23,14 +27,17 @@ open class Customer(first: String?, last: String?) {
|
||||
open class CustomerBuilder() {
|
||||
public var _firstName: String? = "Homer"
|
||||
public var _lastName: String? = "Simpson"
|
||||
|
||||
public open fun WithFirstName(firstName: String?): CustomerBuilder? {
|
||||
_firstName = firstName
|
||||
return this
|
||||
}
|
||||
|
||||
public open fun WithLastName(lastName: String?): CustomerBuilder? {
|
||||
_lastName = lastName
|
||||
return this
|
||||
}
|
||||
|
||||
public open fun Build(): Customer? {
|
||||
return Customer(_firstName, _lastName)
|
||||
}
|
||||
|
||||
@@ -2,23 +2,29 @@ public class Identifier<T>(_myName: T, _myHasDollar: Boolean) {
|
||||
private val myName: T
|
||||
private var myHasDollar: Boolean = false
|
||||
private var myNullable: Boolean = true
|
||||
|
||||
public fun getName(): T {
|
||||
return myName
|
||||
}
|
||||
|
||||
{
|
||||
myName = _myName
|
||||
myHasDollar = _myHasDollar
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
public fun <T> init(name: T): Identifier<T> {
|
||||
val __ = Identifier(name, false)
|
||||
return __
|
||||
}
|
||||
|
||||
public fun <T> init(name: T, isNullable: Boolean): Identifier<T> {
|
||||
val __ = Identifier(name, false)
|
||||
__.myNullable = isNullable
|
||||
return __
|
||||
}
|
||||
|
||||
public fun <T> init(name: T, hasDollar: Boolean, isNullable: Boolean): Identifier<T> {
|
||||
val __ = Identifier(name, hasDollar)
|
||||
__.myNullable = isNullable
|
||||
|
||||
@@ -2,23 +2,29 @@ public open class Identifier<T>(_myName: T?, _myHasDollar: Boolean) {
|
||||
private val myName: T?
|
||||
private var myHasDollar: Boolean = false
|
||||
private var myNullable: Boolean = true
|
||||
|
||||
public open fun getName(): T? {
|
||||
return myName
|
||||
}
|
||||
|
||||
{
|
||||
myName = _myName
|
||||
myHasDollar = _myHasDollar
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
public open fun <T> init(name: T?): Identifier<T> {
|
||||
val __ = Identifier(name, false)
|
||||
return __
|
||||
}
|
||||
|
||||
public open fun <T> init(name: T?, isNullable: Boolean): Identifier<T> {
|
||||
val __ = Identifier(name, false)
|
||||
__.myNullable = isNullable
|
||||
return __
|
||||
}
|
||||
|
||||
public open fun <T> init(name: T?, hasDollar: Boolean, isNullable: Boolean): Identifier<T> {
|
||||
val __ = Identifier(name, hasDollar)
|
||||
__.myNullable = isNullable
|
||||
|
||||
@@ -2,23 +2,29 @@ public class Identifier(_myName: String, _myHasDollar: Boolean) {
|
||||
private val myName: String
|
||||
private var myHasDollar: Boolean = false
|
||||
private var myNullable: Boolean = true
|
||||
|
||||
public fun getName(): String {
|
||||
return myName
|
||||
}
|
||||
|
||||
{
|
||||
myName = _myName
|
||||
myHasDollar = _myHasDollar
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
public fun init(name: String): Identifier {
|
||||
val __ = Identifier(name, false)
|
||||
return __
|
||||
}
|
||||
|
||||
public fun init(name: String, isNullable: Boolean): Identifier {
|
||||
val __ = Identifier(name, false)
|
||||
__.myNullable = isNullable
|
||||
return __
|
||||
}
|
||||
|
||||
public fun init(name: String, hasDollar: Boolean, isNullable: Boolean): Identifier {
|
||||
val __ = Identifier(name, hasDollar)
|
||||
__.myNullable = isNullable
|
||||
|
||||
@@ -2,23 +2,29 @@ public open class Identifier(_myName: String?, _myHasDollar: Boolean) {
|
||||
private val myName: String?
|
||||
private var myHasDollar: Boolean = false
|
||||
private var myNullable: Boolean = true
|
||||
|
||||
public open fun getName(): String? {
|
||||
return myName
|
||||
}
|
||||
|
||||
{
|
||||
myName = _myName
|
||||
myHasDollar = _myHasDollar
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
public open fun init(name: String?): Identifier {
|
||||
val __ = Identifier(name, false)
|
||||
return __
|
||||
}
|
||||
|
||||
public open fun init(name: String?, isNullable: Boolean): Identifier {
|
||||
val __ = Identifier(name, false)
|
||||
__.myNullable = isNullable
|
||||
return __
|
||||
}
|
||||
|
||||
public open fun init(name: String?, hasDollar: Boolean, isNullable: Boolean): Identifier {
|
||||
val __ = Identifier(name, hasDollar)
|
||||
__.myNullable = isNullable
|
||||
|
||||
@@ -7,6 +7,7 @@ public class Test(_myName: String, _a: Boolean, _b: Double, _c: Float, _d: Long,
|
||||
private var e: Int = 0
|
||||
private var f: Short = 0
|
||||
private var g: Char = ' '
|
||||
|
||||
{
|
||||
myName = _myName
|
||||
a = _a
|
||||
@@ -17,15 +18,20 @@ public class Test(_myName: String, _a: Boolean, _b: Double, _c: Float, _d: Long,
|
||||
f = _f
|
||||
g = _g
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
public fun init(): Test {
|
||||
val __ = Test(0, false, 0.toDouble(), 0.toFloat(), 0, 0, 0, ' ')
|
||||
return __
|
||||
}
|
||||
|
||||
public fun init(name: String): Test {
|
||||
val __ = Test(foo(name), false, 0.toDouble(), 0.toFloat(), 0, 0, 0, ' ')
|
||||
return __
|
||||
}
|
||||
|
||||
|
||||
fun foo(n: String): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ public open class Test(_myName: String?, _a: Boolean, _b: Double, _c: Float, _d:
|
||||
private var e: Int = 0
|
||||
private var f: Short = 0
|
||||
private var g: Char = ' '
|
||||
|
||||
{
|
||||
myName = _myName
|
||||
a = _a
|
||||
@@ -17,15 +18,20 @@ public open class Test(_myName: String?, _a: Boolean, _b: Double, _c: Float, _d:
|
||||
f = _f
|
||||
g = _g
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
public open fun init(): Test {
|
||||
val __ = Test(null, false, 0.toDouble(), 0.toFloat(), 0, 0, 0, ' ')
|
||||
return __
|
||||
}
|
||||
|
||||
public open fun init(name: String?): Test {
|
||||
val __ = Test(foo(name), false, 0.toDouble(), 0.toFloat(), 0, 0, 0, ' ')
|
||||
return __
|
||||
}
|
||||
|
||||
|
||||
open fun foo(n: String?): String? {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
do
|
||||
{
|
||||
}
|
||||
{}
|
||||
while (true)
|
||||
@@ -1,4 +1,3 @@
|
||||
do
|
||||
{
|
||||
}
|
||||
{}
|
||||
while (true)
|
||||
@@ -3,10 +3,13 @@ package demo
|
||||
enum class MyEnum(_color: Int) {
|
||||
RED : MyEnum(10)
|
||||
BLUE : MyEnum(20)
|
||||
|
||||
private val color: Int
|
||||
|
||||
public fun getColor(): Int {
|
||||
return color
|
||||
}
|
||||
|
||||
{
|
||||
color = _color
|
||||
}
|
||||
|
||||
@@ -3,10 +3,13 @@ package demo
|
||||
enum class MyEnum(_color: Int) {
|
||||
RED : MyEnum(10)
|
||||
BLUE : MyEnum(20)
|
||||
|
||||
private val color: Int
|
||||
|
||||
public fun getColor(): Int {
|
||||
return color
|
||||
}
|
||||
|
||||
{
|
||||
color = _color
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
enum class E {
|
||||
FOO
|
||||
|
||||
fun foo() {
|
||||
FOO.toString()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
enum class E {
|
||||
FOO
|
||||
|
||||
fun foo() {
|
||||
FOO.toString()
|
||||
}
|
||||
|
||||
@@ -4,10 +4,13 @@ enum class Color(c: Int) {
|
||||
RED : Color(23)
|
||||
YELLOW : Color(24)
|
||||
BLUE : Color(25)
|
||||
|
||||
private var code: Int = 0
|
||||
|
||||
public fun getCode(): Int {
|
||||
return code
|
||||
}
|
||||
|
||||
{
|
||||
code = c
|
||||
}
|
||||
|
||||
@@ -4,10 +4,13 @@ enum class Color(c: Int) {
|
||||
RED : Color(23)
|
||||
YELLOW : Color(24)
|
||||
BLUE : Color(25)
|
||||
|
||||
private var code: Int = 0
|
||||
|
||||
public fun getCode(): Int {
|
||||
return code
|
||||
}
|
||||
|
||||
{
|
||||
code = c
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@ package demo
|
||||
|
||||
enum class Color(c: Int) {
|
||||
private var code: Int = 0
|
||||
|
||||
public fun getCode(): Int {
|
||||
return code
|
||||
}
|
||||
|
||||
{
|
||||
code = c
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@ package demo
|
||||
|
||||
enum class Color(c: Int) {
|
||||
private var code: Int = 0
|
||||
|
||||
public fun getCode(): Int {
|
||||
return code
|
||||
}
|
||||
|
||||
{
|
||||
code = c
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ enum class Color : Runnable {
|
||||
RED
|
||||
YELLOW
|
||||
BLUE
|
||||
|
||||
override fun run() {
|
||||
System.out.println("name()=" + name() + ", toString()=" + toString())
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ enum class Color : Runnable {
|
||||
RED
|
||||
YELLOW
|
||||
BLUE
|
||||
|
||||
override fun run() {
|
||||
System.out?.println("name()=" + name() + ", toString()=" + toString())
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
val i = 0
|
||||
while (i <0)
|
||||
{
|
||||
{
|
||||
}
|
||||
{}
|
||||
{
|
||||
j++
|
||||
i++
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
var i: Int = 0
|
||||
while (i <0)
|
||||
{
|
||||
{
|
||||
}
|
||||
{}
|
||||
{
|
||||
j++
|
||||
i++
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
for (n in list)
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -1,3 +1,2 @@
|
||||
for (n in list)
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -4,15 +4,19 @@ class Test() : Base() {
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun equals(o: Any): Boolean {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
override fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
override fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
@@ -21,15 +25,19 @@ class Base() {
|
||||
public fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public fun equals(o: Any): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public fun toString(): String {
|
||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
|
||||
protected fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
|
||||
@@ -4,15 +4,19 @@ open class Test() : Base() {
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun equals(o: Any?): Boolean {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
override fun clone(): Any? {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
override fun toString(): String? {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
override fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
@@ -21,15 +25,19 @@ open class Base() {
|
||||
public open fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public open fun equals(o: Any?): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
protected open fun clone(): Any? {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public open fun toString(): String? {
|
||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
|
||||
protected open fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
|
||||
@@ -4,15 +4,19 @@ class Test() {
|
||||
public fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public fun equals(o: Any): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public fun toString(): String {
|
||||
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
|
||||
protected fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
|
||||
@@ -4,15 +4,19 @@ open class Test() {
|
||||
public open fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public open fun equals(o: Any?): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
protected open fun clone(): Any? {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public open fun toString(): String? {
|
||||
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
|
||||
protected open fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ class `$`() {
|
||||
}
|
||||
class `$$`(`$$$$`: `$$$$$`) : `$`() {
|
||||
val `$$$`: `$$$$$`
|
||||
|
||||
public fun `$$$$$$`(): `$$$$$` {
|
||||
return `$$$`
|
||||
}
|
||||
|
||||
{
|
||||
`$$$` = `$$$$`
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ open class `$`() {
|
||||
}
|
||||
open class `$$`(`$$$$`: `$$$$$`?) : `$`() {
|
||||
val `$$$`: `$$$$$`?
|
||||
|
||||
public open fun `$$$$$$`(): `$$$$$`? {
|
||||
return `$$$`
|
||||
}
|
||||
|
||||
{
|
||||
`$$$` = `$$$$`
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
if (1 > 0)
|
||||
{
|
||||
}
|
||||
{}
|
||||
else
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -1,6 +1,4 @@
|
||||
if (1 > 0)
|
||||
{
|
||||
}
|
||||
{}
|
||||
else
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -2,6 +2,7 @@ class Base<T>(name: T) {
|
||||
}
|
||||
class One<T, K>(name: T, second: K) : Base<T>(name) {
|
||||
private var mySecond: K = 0
|
||||
|
||||
{
|
||||
mySecond = second
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ open class Base<T>(name: T?) {
|
||||
}
|
||||
open class One<T, K>(name: T?, second: K?) : Base<T?>(name) {
|
||||
private var mySecond: K? = null
|
||||
|
||||
{
|
||||
mySecond = second
|
||||
}
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ class Base(name: String) {
|
||||
}
|
||||
class One(name: String, second: String) : Base(name) {
|
||||
private var mySecond: String = 0
|
||||
|
||||
{
|
||||
mySecond = second
|
||||
}
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ open class Base(name: String?) {
|
||||
}
|
||||
open class One(name: String?, second: String?) : Base(name) {
|
||||
private var mySecond: String? = null
|
||||
|
||||
{
|
||||
mySecond = second
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@ This is a block comment
|
||||
*/
|
||||
class C() {
|
||||
// This is a class comment
|
||||
|
||||
/**
|
||||
* This is a field doc comment.
|
||||
*/
|
||||
private var i: Int = 0
|
||||
|
||||
/**
|
||||
* This is a function doc comment.
|
||||
*/
|
||||
|
||||
@@ -4,10 +4,12 @@ This is a block comment
|
||||
*/
|
||||
open class C() {
|
||||
// This is a class comment
|
||||
|
||||
/**
|
||||
* This is a field doc comment.
|
||||
*/
|
||||
private var i: Int = 0
|
||||
|
||||
/**
|
||||
* This is a function doc comment.
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package demo
|
||||
|
||||
class C(i: Int) {
|
||||
private val i: Int
|
||||
|
||||
{
|
||||
this.i = i
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package demo
|
||||
|
||||
open class C(i: Int) {
|
||||
private val i: Int
|
||||
|
||||
{
|
||||
this.i = i
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package demo
|
||||
class Test() {
|
||||
fun putInt(i: Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val b = 10
|
||||
putInt(b.toInt())
|
||||
|
||||
@@ -3,6 +3,7 @@ package demo
|
||||
open class Test() {
|
||||
open fun putInt(i: Int?) {
|
||||
}
|
||||
|
||||
open fun test() {
|
||||
var b: Byte = 10
|
||||
putInt(b.toInt())
|
||||
|
||||
@@ -3,6 +3,7 @@ package demo
|
||||
class Test() {
|
||||
fun putInt(i: Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val i = 10
|
||||
putInt(i)
|
||||
|
||||
@@ -3,6 +3,7 @@ package demo
|
||||
open class Test() {
|
||||
open fun putInt(i: Int?) {
|
||||
}
|
||||
|
||||
open fun test() {
|
||||
var i: Int = 10
|
||||
putInt(i)
|
||||
|
||||
@@ -3,6 +3,7 @@ package demo
|
||||
class Test() {
|
||||
fun putInt(i: Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val b = 10
|
||||
putInt(b.toInt())
|
||||
|
||||
@@ -3,6 +3,7 @@ package demo
|
||||
open class Test() {
|
||||
open fun putInt(i: Int) {
|
||||
}
|
||||
|
||||
open fun test() {
|
||||
var b: Byte = 10
|
||||
putInt(b.toInt())
|
||||
|
||||
@@ -2,23 +2,29 @@ public class Identifier<T>(_myName: T, _myHasDollar: Boolean) {
|
||||
private val myName: T
|
||||
private var myHasDollar: Boolean = false
|
||||
private var myNullable: Boolean = true
|
||||
|
||||
public fun getName(): T {
|
||||
return myName
|
||||
}
|
||||
|
||||
{
|
||||
myName = _myName
|
||||
myHasDollar = _myHasDollar
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
public fun <T> init(name: T): Identifier<T> {
|
||||
val __ = Identifier(name, false)
|
||||
return __
|
||||
}
|
||||
|
||||
public fun <T> init(name: T, isNullable: Boolean): Identifier<T> {
|
||||
val __ = Identifier(name, false)
|
||||
__.myNullable = isNullable
|
||||
return __
|
||||
}
|
||||
|
||||
public fun <T> init(name: T, hasDollar: Boolean, isNullable: Boolean): Identifier<T> {
|
||||
val __ = Identifier(name, hasDollar)
|
||||
__.myNullable = isNullable
|
||||
|
||||
@@ -2,23 +2,29 @@ public open class Identifier<T>(_myName: T?, _myHasDollar: Boolean) {
|
||||
private val myName: T?
|
||||
private var myHasDollar: Boolean = false
|
||||
private var myNullable: Boolean = true
|
||||
|
||||
public open fun getName(): T? {
|
||||
return myName
|
||||
}
|
||||
|
||||
{
|
||||
myName = _myName
|
||||
myHasDollar = _myHasDollar
|
||||
}
|
||||
|
||||
class object {
|
||||
|
||||
public open fun <T> init(name: T?): Identifier<T> {
|
||||
val __ = Identifier(name, false)
|
||||
return __
|
||||
}
|
||||
|
||||
public open fun <T> init(name: T?, isNullable: Boolean): Identifier<T> {
|
||||
val __ = Identifier(name, false)
|
||||
__.myNullable = isNullable
|
||||
return __
|
||||
}
|
||||
|
||||
public open fun <T> init(name: T?, hasDollar: Boolean, isNullable: Boolean): Identifier<T> {
|
||||
val __ = Identifier(name, hasDollar)
|
||||
__.myNullable = isNullable
|
||||
|
||||
@@ -4,9 +4,11 @@ class Base() {
|
||||
public fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public fun equals(o: Any): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
public fun toString(): String {
|
||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
@@ -15,9 +17,11 @@ class Child() : Base() {
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun equals(o: Any): Boolean {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ open class Base() {
|
||||
public open fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public open fun equals(o: Any?): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
public open fun toString(): String? {
|
||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
@@ -15,9 +17,11 @@ open class Child() : Base() {
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun equals(o: Any?): Boolean {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
override fun toString(): String? {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package demo
|
||||
|
||||
class Test(i: Int) {
|
||||
|
||||
fun test() {
|
||||
val i = 10
|
||||
Test(i)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package demo
|
||||
|
||||
open class Test(i: Int?) {
|
||||
|
||||
open fun test() {
|
||||
var i: Int = 10
|
||||
Test(i)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package demo
|
||||
|
||||
class Test(i: Int) {
|
||||
|
||||
fun test() {
|
||||
val b = 10
|
||||
Test(b.toInt())
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package demo
|
||||
|
||||
open class Test(i: Int) {
|
||||
|
||||
open fun test() {
|
||||
var b: Byte = 10
|
||||
Test(b.toInt())
|
||||
|
||||
@@ -4,6 +4,7 @@ class Test() {
|
||||
fun getInteger(i: Int): Int {
|
||||
return i
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val i = getInteger(10)!!
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ open class Test() {
|
||||
open fun getInteger(i: Int?): Int? {
|
||||
return i
|
||||
}
|
||||
|
||||
open fun test() {
|
||||
var i: Int = getInteger(10)!!
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ import java.io.Serializable
|
||||
|
||||
public class Language(code: String) : Serializable {
|
||||
protected var code: String = 0
|
||||
|
||||
override fun toString(): String {
|
||||
return this.code
|
||||
}
|
||||
|
||||
{
|
||||
this.code = code
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ import java.io.Serializable
|
||||
|
||||
public open class Language(code: String?) : Serializable {
|
||||
protected var code: String? = null
|
||||
|
||||
override fun toString(): String? {
|
||||
return this.code
|
||||
}
|
||||
|
||||
{
|
||||
this.code = code
|
||||
}
|
||||
|
||||
@@ -3,13 +3,17 @@ package com.voltvoodoo.saplo4j.model
|
||||
import java.io.Serializable
|
||||
|
||||
public class Language(code: String) : Serializable {
|
||||
|
||||
protected var code: String = 0
|
||||
|
||||
public fun equals(other: Language): Boolean {
|
||||
return other.toString().equals(this.toString())
|
||||
}
|
||||
|
||||
{
|
||||
this.code = code
|
||||
}
|
||||
|
||||
class object {
|
||||
public var ENGLISH: Language = Language("en")
|
||||
public var SWEDISH: Language = Language("sv")
|
||||
|
||||
@@ -3,13 +3,17 @@ package com.voltvoodoo.saplo4j.model
|
||||
import java.io.Serializable
|
||||
|
||||
public open class Language(code: String?) : Serializable {
|
||||
|
||||
protected var code: String? = null
|
||||
|
||||
public open fun equals(other: Language?): Boolean {
|
||||
return other?.toString()?.equals(this.toString())!!
|
||||
}
|
||||
|
||||
{
|
||||
this.code = code
|
||||
}
|
||||
|
||||
class object {
|
||||
public var ENGLISH: Language? = Language("en")
|
||||
public var SWEDISH: Language? = Language("sv")
|
||||
|
||||
@@ -2,6 +2,7 @@ package demo
|
||||
|
||||
class C(a: Int) {
|
||||
var abc: Int = 0
|
||||
|
||||
{
|
||||
abc = a * 2
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package demo
|
||||
|
||||
open class C(a: Int) {
|
||||
var abc: Int = 0
|
||||
|
||||
{
|
||||
abc = a * 2
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ class Test() : java.lang.Iterable<String> {
|
||||
override fun iterator(): java.util.Iterator<String> {
|
||||
return null
|
||||
}
|
||||
|
||||
public fun push(i: java.util.Iterator<String>): java.util.Iterator<String> {
|
||||
val j = i
|
||||
return j
|
||||
@@ -13,6 +14,7 @@ class FullTest() : java.lang.Iterable<String> {
|
||||
override fun iterator(): java.util.Iterator<String> {
|
||||
return null
|
||||
}
|
||||
|
||||
public fun push(i: java.util.Iterator<String>): java.util.Iterator<String> {
|
||||
val j = i
|
||||
return j
|
||||
|
||||
@@ -4,6 +4,7 @@ open class Test() : java.lang.Iterable<String?> {
|
||||
override fun iterator(): java.util.Iterator<String?>? {
|
||||
return null
|
||||
}
|
||||
|
||||
public open fun push(i: java.util.Iterator<String?>?): java.util.Iterator<String?>? {
|
||||
var j: java.util.Iterator<String?>? = i
|
||||
return j
|
||||
@@ -13,6 +14,7 @@ open class FullTest() : java.lang.Iterable<String?> {
|
||||
override fun iterator(): java.util.Iterator<String?>? {
|
||||
return null
|
||||
}
|
||||
|
||||
public open fun push(i: java.util.Iterator<String?>?): java.util.Iterator<String?>? {
|
||||
var j: java.util.Iterator<String?>? = i
|
||||
return j
|
||||
|
||||
@@ -8,6 +8,7 @@ class Test() {
|
||||
val d2 = 10.0
|
||||
val f2 = 10.0.toFloat()
|
||||
}
|
||||
|
||||
fun testBoxed() {
|
||||
val l1 = 10
|
||||
val d1 = 10.0
|
||||
|
||||
@@ -8,6 +8,7 @@ open class Test() {
|
||||
var d2: Double = 10.0
|
||||
var f2: Float = 10.0.toFloat()
|
||||
}
|
||||
|
||||
open fun testBoxed() {
|
||||
var l1: Long? = 10
|
||||
var d1: Double? = 10.0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
val s = null
|
||||
if (!s.isEmpty())
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -1,4 +1,3 @@
|
||||
var s: String? = null
|
||||
if (!s?.isEmpty()!!)
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -4,6 +4,7 @@ class B(i: Int) {
|
||||
}
|
||||
}
|
||||
class A() : B(10) {
|
||||
|
||||
override fun call(): Int {
|
||||
return super.call()
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ open class B(i: Int) {
|
||||
}
|
||||
}
|
||||
open class A() : B(10) {
|
||||
|
||||
override fun call(): Int {
|
||||
return super.call()
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ public class SwitchDemo() {
|
||||
public fun print(o: Any) {
|
||||
System.out.println(o)
|
||||
}
|
||||
|
||||
public fun test(i: Int) {
|
||||
val monthString = "<empty>"
|
||||
when (i) {
|
||||
@@ -81,6 +82,7 @@ public class SwitchDemo() {
|
||||
}
|
||||
System.out.println(monthString)
|
||||
}
|
||||
|
||||
public fun main(args: Array<String>) {
|
||||
for (i in 1..12) test(i)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ public open class SwitchDemo() {
|
||||
public open fun print(o: Any?) {
|
||||
System.out?.println(o)
|
||||
}
|
||||
|
||||
public open fun test(i: Int) {
|
||||
var monthString: String? = "<empty>"
|
||||
when (i) {
|
||||
@@ -81,6 +82,7 @@ public open class SwitchDemo() {
|
||||
}
|
||||
System.out?.println(monthString)
|
||||
}
|
||||
|
||||
public open fun main(args: Array<String?>?) {
|
||||
for (i in 1..12) test(i)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
try
|
||||
{
|
||||
}
|
||||
{}
|
||||
catch (e : Exception) {
|
||||
println(1)
|
||||
}
|
||||
@@ -8,5 +7,4 @@ catch (e : IOException) {
|
||||
println(0)
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -1,6 +1,5 @@
|
||||
try
|
||||
{
|
||||
}
|
||||
{}
|
||||
catch (e : Exception) {
|
||||
println(1)
|
||||
}
|
||||
@@ -8,5 +7,4 @@ catch (e : IOException) {
|
||||
println(0)
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -1,6 +1,5 @@
|
||||
try
|
||||
{
|
||||
}
|
||||
{}
|
||||
catch (e : Exception) {
|
||||
println(1)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
try
|
||||
{
|
||||
}
|
||||
{}
|
||||
catch (e : Exception) {
|
||||
println(1)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
try
|
||||
{
|
||||
}
|
||||
{}
|
||||
catch (e : Exception) {
|
||||
println(1)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
try
|
||||
{
|
||||
}
|
||||
{}
|
||||
catch (e : Exception) {
|
||||
println(1)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
while (true)
|
||||
{
|
||||
}
|
||||
{}
|
||||
@@ -1,3 +1,2 @@
|
||||
while (true)
|
||||
{
|
||||
}
|
||||
{}
|
||||
Reference in New Issue
Block a user