Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
In the lowering for pattern match expressions, locals for pattern variables are hoisted into the enclosing block scope and these need to be kept track of to be able to tell when local names need to be mangled.
In the lowering for pattern match expressions, locals for pattern variables are hoisted into the enclosing block scope and these need to be kept track of to be able to tell when local names need to be mangled.
In most cases, these pattern variable names need to be added to the block scope for more than one level.
One example is when lowering if (o instanceof Foo f), an extra block scope is pushed while processing the o instanceof Foo f condition to allow more control for where pattern locals are added to the scope. But, the f local is hoisted into the block containing the if, so this must be recorded both in the block scope for o instanceof ... and be propagated up into the enclosing block. This method is simply a helper method which takes care of the propagation.