Skip to content

Commit

Permalink
Polish and document separation checker.
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Feb 1, 2025
1 parent b0628d1 commit f3c59cc
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 32 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ class CheckCaptures extends Recheck, SymTransformer:
end checker

checker.traverse(unit)(using ctx.withOwner(defn.RootClass))
if ccConfig.useSepChecks then SepChecker(this).traverse(unit)
if ccConfig.useSepChecks then SepCheck(this).traverse(unit)
if !ctx.reporter.errorsReported then
// We dont report errors here if previous errors were reported, because other
// errors often result in bad applied types, but flagging these bad types gives
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/cc/Fresh.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ object Fresh:
case _ => None
end Cap

/** Map each occurrence of cap to a different Sep.Cap instance */
class FromCap(owner: Symbol)(using Context) extends BiTypeMap, FollowAliasesMap:
thisMap =>

Expand Down
Loading

0 comments on commit f3c59cc

Please sign in to comment.