Skip to content

Commit acacb13

Browse files
committed
Detect local root capability in curried methods
1 parent 0910304 commit acacb13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ extension (sym: Symbol)
392392
*/
393393
def definedLocalRoot(using Context): Symbol =
394394
sym.paramSymss.dropWhile(psyms => psyms.nonEmpty && psyms.head.isType) match
395-
case psyms :: Nil => psyms.find(_.info.typeSymbol == defn.Caps_Root).getOrElse(NoSymbol)
395+
case psyms :: _ => psyms.find(_.info.typeSymbol == defn.Caps_Root).getOrElse(NoSymbol)
396396
case _ => NoSymbol
397397

398398
def localRoot(using Context): Symbol =

0 commit comments

Comments
 (0)