From 8ea566488c079302e6caac7a84293041f963d933 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Mon, 9 Sep 2024 15:52:38 +0200 Subject: [PATCH] Remove comments --- compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala | 6 +----- tests/pos-custom-args/captures/unbox.scala | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala index 3b770d7a7436..848abb93bac4 100644 --- a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala +++ b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala @@ -497,11 +497,7 @@ class CheckCaptures extends Recheck, SymTransformer: def isStableSel = selType match case selType: NamedType => selType.symbol.isStableMember case _ => false - - // println(i"recheck sel $tree, qualType = $qualType, selType = $selType") - // println(i"qual cs = ${qualType.captureSet}, sel cs = ${selType.captureSet}, sel widen cs = ${selType.widen.captureSet}") - // println(i"isStable = ${selType.isTrackableRef}, pt = $pt") - + if pt == LhsProto || qualType.isBoxedCapturing || selType.isTrackableRef diff --git a/tests/pos-custom-args/captures/unbox.scala b/tests/pos-custom-args/captures/unbox.scala index 17e24ba436a8..33702a954068 100644 --- a/tests/pos-custom-args/captures/unbox.scala +++ b/tests/pos-custom-args/captures/unbox.scala @@ -4,7 +4,3 @@ type Proc = () => Unit val xs: List[Proc] = ??? val x = xs.head // error - -val xs2: List[() ->{xs*} Unit] = xs - -val x2: () ->{xs*} Unit = xs2.head