Uast: Fix for missing local variables in ctor-s bodies
similar to how it is done in `KotlinUBlockExpression`
This commit is contained in:
@@ -67,6 +67,8 @@ class AWithSecondaryInit {
|
||||
|
||||
constructor(s: String) {
|
||||
a = s
|
||||
var local: String = s
|
||||
local.toString()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -151,3 +151,11 @@ UFile (package = )
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = s)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = local)
|
||||
USimpleNameReferenceExpression (identifier = s)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = local)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toString))
|
||||
USimpleNameReferenceExpression (identifier = toString)
|
||||
|
||||
@@ -75,5 +75,7 @@ public final class AWithSecondaryInit {
|
||||
public fun AWithSecondaryInit(@org.jetbrains.annotations.NotNull s: java.lang.String) {
|
||||
<init>()
|
||||
a = s
|
||||
var local: java.lang.String = s
|
||||
local.toString()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user