FIR/UAST: commonize loop/break/continue expressions
This commit is contained in:
committed by
Ilya Kirillov
parent
1146f60db3
commit
50f750187b
@@ -0,0 +1,6 @@
|
||||
fun test() {
|
||||
var x : String? = null
|
||||
do {
|
||||
x = "non-null"
|
||||
} while (x != null)
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
UFile (package = )
|
||||
UClass (name = DoWhileKt)
|
||||
UMethod (name = test)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = x)
|
||||
ULiteralExpression (value = null)
|
||||
UDoWhileExpression
|
||||
UBinaryExpression (operator = !=)
|
||||
USimpleNameReferenceExpression (identifier = x)
|
||||
ULiteralExpression (value = null)
|
||||
UBlockExpression
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = x)
|
||||
ULiteralExpression (value = "non-null")
|
||||
@@ -0,0 +1,9 @@
|
||||
UFile (package = )
|
||||
UClass (name = DoWhileKt)
|
||||
UMethod (name = test)
|
||||
UBlockExpression
|
||||
[!] UnknownKotlinExpression (PROPERTY)
|
||||
UDoWhileExpression
|
||||
[!] UnknownKotlinExpression (BINARY_EXPRESSION)
|
||||
UBlockExpression
|
||||
[!] UnknownKotlinExpression (BINARY_EXPRESSION)
|
||||
@@ -0,0 +1,9 @@
|
||||
public final class DoWhileKt {
|
||||
public static final fun test() : void {
|
||||
var x: java.lang.String = null
|
||||
do {
|
||||
x = "non-null"
|
||||
}while (x != null)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public final class DoWhileKt {
|
||||
public static final fun test() : void {
|
||||
[!] UnknownKotlinExpression (PROPERTY)
|
||||
do {
|
||||
[!] UnknownKotlinExpression (BINARY_EXPRESSION)
|
||||
}while ([!] UnknownKotlinExpression (BINARY_EXPRESSION))
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user