Generate class members (functions, properties, nested classes).

This commit is contained in:
Dmitry Petrov
2016-08-25 18:33:12 +03:00
committed by Dmitry Petrov
parent 19e95d232a
commit 703d3405ed
13 changed files with 174 additions and 56 deletions
@@ -12,6 +12,7 @@ FILE /arrayAugmentedAssignment1.kt
RETURN type=kotlin.Nothing
CONST Int type=kotlin.Int value='42'
CLASS CLASS C
PROPERTY public final val x: kotlin.IntArray getter=null setter=null
FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.IntArray
@@ -1,6 +1,8 @@
FILE /arrayAugmentedAssignment2.kt
CLASS INTERFACE IA
FUN public abstract operator fun get(/*0*/ index: kotlin.String): kotlin.Int
CLASS INTERFACE IB
FUN public abstract operator fun IA.set(/*0*/ index: kotlin.String, /*1*/ value: kotlin.Int): kotlin.Unit
FUN public fun IB.test(/*0*/ a: IA): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=PLUSEQ
+1
View File
@@ -1,5 +1,6 @@
FILE /assignments.kt
CLASS CLASS Ref
PROPERTY public final var x: kotlin.Int getter=null setter=null
FUN public fun test1(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.Int
+8
View File
@@ -1,5 +1,13 @@
FILE /chainOfSafeCalls.kt
CLASS CLASS C
FUN public final fun foo(): C
BLOCK_BODY
RETURN type=kotlin.Nothing
THIS public final class C type=C
FUN public final fun bar(): C?
BLOCK_BODY
RETURN type=kotlin.Nothing
THIS public final class C type=C
FUN public fun test(/*0*/ nc: C?): C?
BLOCK_BODY
RETURN type=kotlin.Nothing
+1
View File
@@ -1,6 +1,7 @@
FILE /conventionComparisons.kt
CLASS INTERFACE IA
CLASS INTERFACE IB
FUN public abstract operator fun IA.compareTo(/*0*/ other: IA): kotlin.Int
FUN public fun IB.test1(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing
@@ -1,7 +1,33 @@
FILE /forWithImplicitReceivers.kt
CLASS OBJECT FiveTimes
CLASS CLASS IntCell
PROPERTY public final var value: kotlin.Int getter=null setter=null
CLASS INTERFACE IReceiver
FUN public open operator fun FiveTimes.iterator(): IntCell
BLOCK_BODY
RETURN type=kotlin.Nothing
CALL .<init> type=IntCell operator=null
value: CONST Int type=kotlin.Int value='5'
FUN public open operator fun IntCell.hasNext(): kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: CALL .<get-value> type=kotlin.Int operator=GET_PROPERTY
$this: $RECEIVER of: hasNext type=IntCell
other: CONST Int type=kotlin.Int value='0'
FUN public open operator fun IntCell.next(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing
BLOCK type=kotlin.Int operator=POSTFIX_DECR
VAR val tmp0: kotlin.Int
CALL .<get-value> type=kotlin.Int operator=POSTFIX_DECR
$this: $RECEIVER of: next type=IntCell
CALL .<set-value> type=kotlin.Unit operator=POSTFIX_DECR
$this: $RECEIVER of: next type=IntCell
<set-?>: CALL .dec type=kotlin.Int operator=POSTFIX_DECR
$this: GET_VAR tmp0 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int operator=null
FUN public fun IReceiver.test(): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=FOR_LOOP
+6
View File
@@ -1,6 +1,12 @@
FILE /safeCalls.kt
CLASS CLASS Ref
PROPERTY public final var value: kotlin.Int getter=null setter=null
CLASS INTERFACE IHost
FUN public open fun kotlin.String.extLength(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing
CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: $RECEIVER of: extLength type=kotlin.String
FUN public fun test1(/*0*/ x: kotlin.String?): kotlin.Int?
BLOCK_BODY
RETURN type=kotlin.Nothing
+2
View File
@@ -1,10 +1,12 @@
FILE /values.kt
CLASS ENUM_CLASS Enum
CLASS ENUM_ENTRY A
CLASS OBJECT A
PROPERTY public val a: kotlin.Int = 0 getter=null setter=null
EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
CLASS CLASS Z
CLASS OBJECT Companion
FUN public fun test1(): Enum
BLOCK_BODY
RETURN type=kotlin.Nothing