another one case with constructors supported
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
open class Library() {
|
||||
open class Library(ourOut : PrintStream?) {
|
||||
class object {
|
||||
val ourOut : PrintStream?
|
||||
}
|
||||
{
|
||||
this.ourOut = ourOut
|
||||
}
|
||||
}
|
||||
open class User() {
|
||||
open fun main() : Unit {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
open class Library() {
|
||||
open class Library(myString : String?) {
|
||||
public val myString : String?
|
||||
{
|
||||
this.myString = myString
|
||||
}
|
||||
}
|
||||
open class User() {
|
||||
open fun main() : Unit {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
abstract open class Shape() {
|
||||
public var color : String?
|
||||
{
|
||||
}
|
||||
open public fun setColor(c : String?) : Unit {
|
||||
color = c
|
||||
}
|
||||
@@ -9,4 +7,6 @@ open public fun getColor() : String? {
|
||||
return color
|
||||
}
|
||||
abstract open public fun area() : Double
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
class T() {
|
||||
class T(a : String?, b : String?) {
|
||||
var a : String?
|
||||
var b : String?
|
||||
var c : String? = "abc"
|
||||
{
|
||||
this.a = a
|
||||
this.b = b
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
open class C(arg1 : Int, arg2 : Int, arg3 : Int) {
|
||||
{
|
||||
}
|
||||
class object {
|
||||
open fun init(arg1 : Int, arg2 : Int) : C {
|
||||
val __ = C(arg1, arg2, 0)
|
||||
@@ -11,6 +9,8 @@ val __ = C(arg1, 0, 0)
|
||||
return __
|
||||
}
|
||||
}
|
||||
{
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
class object {
|
||||
|
||||
@@ -2,11 +2,6 @@ open class C(arg1 : Int) {
|
||||
val myArg1 : Int
|
||||
var myArg2 : Int
|
||||
var myArg3 : Int
|
||||
{
|
||||
$myArg1 = arg1
|
||||
$myArg2 = 0
|
||||
$myArg3 = 0
|
||||
}
|
||||
class object {
|
||||
open fun init(arg1 : Int, arg2 : Int, arg3 : Int) : C {
|
||||
val __ = C(arg1)
|
||||
@@ -21,6 +16,11 @@ __.myArg3 = 0
|
||||
return __
|
||||
}
|
||||
}
|
||||
{
|
||||
$myArg1 = arg1
|
||||
$myArg2 = 0
|
||||
$myArg3 = 0
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
class object {
|
||||
|
||||
@@ -2,12 +2,6 @@ namespace org.test.customer {
|
||||
open class Customer(first : String?, last : String?) {
|
||||
public val _firstName : String?
|
||||
public val _lastName : String?
|
||||
{
|
||||
doSmthBefore()
|
||||
$_firstName = first
|
||||
$_lastName = last
|
||||
doSmthAfter()
|
||||
}
|
||||
open public fun getFirstName() : String? {
|
||||
return _firstName
|
||||
}
|
||||
@@ -18,6 +12,12 @@ open private fun doSmthBefore() : Unit {
|
||||
}
|
||||
open private fun doSmthAfter() : Unit {
|
||||
}
|
||||
{
|
||||
doSmthBefore()
|
||||
$_firstName = first
|
||||
$_lastName = last
|
||||
doSmthAfter()
|
||||
}
|
||||
}
|
||||
open class CustomerBuilder() {
|
||||
public var _firstName : String? = "Homer"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
public class Identifier {
|
||||
private final String myName;
|
||||
private boolean myHasDollar;
|
||||
private boolean myNullable = true;
|
||||
|
||||
public Identifier(String name) {
|
||||
myName = name;
|
||||
}
|
||||
|
||||
public Identifier(String name, boolean isNullable) {
|
||||
myName = name;
|
||||
myNullable = isNullable;
|
||||
}
|
||||
|
||||
public Identifier(String name, boolean hasDollar, boolean isNullable) {
|
||||
myName = name;
|
||||
myHasDollar = hasDollar;
|
||||
myNullable = isNullable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return myName;
|
||||
}
|
||||
}
|
||||
|
||||
public class User {
|
||||
public static void main() {
|
||||
Identifier i1 = new Identifier("name", false, true);
|
||||
Identifier i2 = new Identifier("name", false);
|
||||
Identifier i3 = new Identifier("name");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
public open class Identifier(myName : String?, myHasDollar : Boolean) {
|
||||
private val myName : String?
|
||||
private var myHasDollar : Boolean
|
||||
private var myNullable : Boolean = true
|
||||
class object {
|
||||
open public fun init(name : String?) : Identifier {
|
||||
val __ = Identifier(name, false)
|
||||
return __
|
||||
}
|
||||
open public fun init(name : String?, isNullable : Boolean) : Identifier {
|
||||
val __ = Identifier(name, false)
|
||||
__.myNullable = isNullable
|
||||
return __
|
||||
}
|
||||
open public fun init(name : String?, hasDollar : Boolean, isNullable : Boolean) : Identifier {
|
||||
val __ = Identifier(name, hasDollar)
|
||||
__.myNullable = isNullable
|
||||
return __
|
||||
}
|
||||
}
|
||||
open public fun getName() : String? {
|
||||
return myName
|
||||
}
|
||||
{
|
||||
this.myName = myName
|
||||
this.myHasDollar = myHasDollar
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
class object {
|
||||
open public fun main() : Unit {
|
||||
var i1 : Identifier? = Identifier.init("name", false, true)
|
||||
var i2 : Identifier? = Identifier.init("name", false)
|
||||
var i3 : Identifier? = Identifier.init("name")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
enum Color {
|
||||
WHITE(21)
|
||||
BLACK(22)
|
||||
RED(23)
|
||||
YELLOW(24)
|
||||
BLUE(25)
|
||||
enum Color(c: Int) {
|
||||
WHITE : Color(21)
|
||||
BLACK : Color(22)
|
||||
RED : Color(23)
|
||||
YELLOW : Color(24)
|
||||
BLUE : Color(25)
|
||||
private var code : Int
|
||||
open private (c : Int) {
|
||||
{
|
||||
$code = c
|
||||
}
|
||||
open public fun getCode() : Int {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
Foo f;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
private Foo f;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
protected Foo f;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
public Foo f;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
final Foo f = new Foo(1, 2);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
Foo f = new Foo(1, 2);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
Foo f;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Foo f;
|
||||
@@ -1 +0,0 @@
|
||||
var f : Foo?
|
||||
@@ -1 +0,0 @@
|
||||
private Foo f;
|
||||
@@ -1 +0,0 @@
|
||||
private var f : Foo?
|
||||
@@ -1 +0,0 @@
|
||||
protected Foo f;
|
||||
@@ -1 +0,0 @@
|
||||
protected var f : Foo?
|
||||
@@ -1 +0,0 @@
|
||||
public Foo f;
|
||||
@@ -1 +0,0 @@
|
||||
public var f : Foo?
|
||||
@@ -1 +0,0 @@
|
||||
final Foo f = new Foo(1, 2);
|
||||
@@ -1 +0,0 @@
|
||||
val f : Foo? = Foo(1, 2)
|
||||
@@ -1 +0,0 @@
|
||||
Foo f = new Foo(1, 2);
|
||||
@@ -1 +0,0 @@
|
||||
var f : Foo? = Foo(1, 2)
|
||||
@@ -1 +0,0 @@
|
||||
Foo f;
|
||||
@@ -1 +0,0 @@
|
||||
var f : Foo?
|
||||
@@ -4,10 +4,10 @@ open class `$`() {
|
||||
}
|
||||
open class `$$`(`$$$$` : `$$$$$`?) : `$` {
|
||||
val `$$$` : `$$$$$`?
|
||||
{
|
||||
$`$$$` = `$$$$`
|
||||
}
|
||||
open public fun `$$$$$$`() : `$$$$$`? {
|
||||
return `$$$`
|
||||
}
|
||||
{
|
||||
$`$$$` = `$$$$`
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,10 @@ open fun call() : Unit {
|
||||
}
|
||||
}
|
||||
open class A() : B {
|
||||
{
|
||||
super()
|
||||
}
|
||||
override fun call() : Unit {
|
||||
return super.call()
|
||||
}
|
||||
{
|
||||
super()
|
||||
}
|
||||
}
|
||||
@@ -4,4 +4,9 @@ val IN : String? = "in"
|
||||
val AT : String? = "@"
|
||||
val COMMA_WITH_SPACE : String? = (COMMA + SPACE)
|
||||
}
|
||||
{
|
||||
this.IN = IN
|
||||
this.AT = AT
|
||||
this.COMMA_WITH_SPACE = COMMA_WITH_SPACE
|
||||
}
|
||||
}
|
||||
@@ -4,4 +4,9 @@ public val IN : String? = "in"
|
||||
public val AT : String? = "@"
|
||||
public val COMMA_WITH_SPACE : String? = (COMMA + SPACE)
|
||||
}
|
||||
{
|
||||
this.IN = IN
|
||||
this.AT = AT
|
||||
this.COMMA_WITH_SPACE = COMMA_WITH_SPACE
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user