Skip to content

Commit b4fff3a

Browse files
committed
Don't increase symLevel for blocks
1 parent c64905f commit b4fff3a

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,6 @@ class CheckCaptures extends Recheck, SymTransformer:
887887
report.error(em"$refArg is not a tracked capability", refArg.srcPos)
888888
case _ =>
889889

890-
override def recheckBlock(tree: Block, pt: Type)(using Context): Type =
891-
ccState.inNestedLevel(super.recheckBlock(tree, pt))
892-
893890
/** Recheck Closure node: add the captured vars of the anonymoys function
894891
* to the result type. See also `recheckClosureBlock` which rechecks the
895892
* block containing the anonymous function and the Closure node.

compiler/src/dotty/tools/dotc/cc/Setup.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,6 @@ class Setup extends PreRecheck, SymTransformer, SetupAPI:
586586
traverse(elems)
587587
tpt.setNuType(box(transformInferredType(tpt.tpe)))
588588

589-
case tree: Block =>
590-
ccState.inNestedLevel(traverseChildren(tree))
591-
592589
case _ =>
593590
traverseChildren(tree)
594591
postProcess(tree)

0 commit comments

Comments
 (0)