Kotlin: Add KotlinType to localvars

This commit is contained in:
Ian Lynagh
2021-11-03 16:51:05 +00:00
parent 06a41b3923
commit 6cf0b755f0
5 changed files with 10 additions and 6 deletions

View File

@@ -1490,7 +1490,7 @@ class LocalVariableDeclExpr extends Expr, @localvariabledeclexpr {
VarAccess getAnAccess() { variableBinding(result, this.getVariable()) }
/** Gets the local variable declared by this local variable declaration expression. */
LocalVariableDecl getVariable() { localvars(result, _, _, this) }
LocalVariableDecl getVariable() { localvars(result, _, _, _, this) }
/** Gets the type access of this local variable declaration expression. */
Expr getTypeAccess() {

View File

@@ -38,13 +38,16 @@ class LocalScopeVariable extends Variable, @localscopevariable {
/** A local variable declaration */
class LocalVariableDecl extends @localvar, LocalScopeVariable {
/** Gets the type of this local variable. */
override Type getType() { localvars(this, _, result, _) }
override Type getType() { localvars(this, _, result, _, _) }
/** Gets the Kotlin type of this local variable. */
override KotlinType getKotlinType() { localvars(this, _, _, result, _) }
/** Gets the expression declaring this variable. */
LocalVariableDeclExpr getDeclExpr() { localvars(this, _, _, result) }
LocalVariableDeclExpr getDeclExpr() { localvars(this, _, _, _, result) }
/** Gets the parent of this declaration. */
Expr getParent() { localvars(this, _, _, result) }
Expr getParent() { localvars(this, _, _, _, result) }
/** Gets the callable in which this declaration occurs. */
override Callable getCallable() { result = this.getParent().getEnclosingCallable() }