Skip to content

Commit

Permalink
update documentation of recheck about top-level boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
Linyxus committed Oct 4, 2022
1 parent 9306894 commit 1bbc604
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ class CheckCaptures extends Recheck, SymTransformer:
case _: RefTree => true
case _ => false

/** If expected type `pt` is boxed, don't propagate free variables.
/** If expected type `pt` is boxed and the tree is a function or a reference,
* don't propagate free variables.
* Otherwise, if the result type is boxed, simulate an unboxing by
* adding all references in the boxed capture set to the current environment.
*/
Expand Down

0 comments on commit 1bbc604

Please sign in to comment.