Skip to content

Commit 9dfc098

Browse files
committed
Fix non-sensical code
Replacing or types by their dominators and implicit conversions caused the code to do the right thing anyway, but with the arrival of true or-types, this became a static error.
1 parent ec28ea1 commit 9dfc098

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dotty/tools/dotc/transform/LambdaLift.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform
121121
private def symSet(f: LinkedHashMap[Symbol, SymSet], sym: Symbol): SymSet =
122122
f.getOrElseUpdate(sym, newSymSet)
123123

124-
def freeVars(sym: Symbol): List[Symbol] = free.getOrElse(sym, Nil).toList
124+
def freeVars(sym: Symbol): List[Symbol] = free get sym match {
125+
case Some(set) => set.toList
126+
case None => Nil
127+
}
125128

126129
def proxyOf(sym: Symbol, fv: Symbol) = proxyMap.getOrElse(sym, Map.empty)(fv)
127130

0 commit comments

Comments
 (0)