Add allScopes property to IrElementVisitorVoidWithContext
This commit is contained in:
committed by
Svyatoslav Scherbina
parent
66b259350a
commit
a46b28718e
+1
@@ -139,6 +139,7 @@ abstract class IrElementVisitorVoidWithContext : IrElementVisitorVoid {
|
|||||||
protected val currentProperty get() = scopeStack.lastOrNull { it.scope.scopeOwner is PropertyDescriptor }
|
protected val currentProperty get() = scopeStack.lastOrNull { it.scope.scopeOwner is PropertyDescriptor }
|
||||||
protected val currentScope get() = scopeStack.peek()
|
protected val currentScope get() = scopeStack.peek()
|
||||||
protected val parentScope get() = if (scopeStack.size < 2) null else scopeStack[scopeStack.size - 2]
|
protected val parentScope get() = if (scopeStack.size < 2) null else scopeStack[scopeStack.size - 2]
|
||||||
|
protected val allScopes get() = scopeStack
|
||||||
|
|
||||||
fun printScopeStack() {
|
fun printScopeStack() {
|
||||||
scopeStack.forEach { println(it.scope.scopeOwner) }
|
scopeStack.forEach { println(it.scope.scopeOwner) }
|
||||||
|
|||||||
Reference in New Issue
Block a user