Skip to content

Commit e7f4e54

Browse files
committed
Revert "Strip CC annotations in TypeMap when CC is not enabled"
This reverts commit 52db678.
1 parent fe49539 commit e7f4e54

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import Hashable.*
3030
import Uniques.*
3131
import collection.mutable
3232
import config.Config
33-
import config.Feature
3433
import config.Feature.sourceVersion
3534
import config.SourceVersion
3635
import annotation.{tailrec, constructorOnly}
@@ -6484,13 +6483,10 @@ object Types extends TypeUtils {
64846483
mapCapturingType(tp, parent, refs, variance)
64856484

64866485
case tp @ AnnotatedType(underlying, annot) =>
6487-
if annot.symbol.isRetainsLike && !Feature.ccEnabledSomewhere then
6488-
this(underlying) // strip retains like annotations unless capture checking is enabled
6489-
else
6490-
val underlying1 = this(underlying)
6491-
val annot1 = annot.mapWith(this)
6492-
if annot1 eq EmptyAnnotation then underlying1
6493-
else derivedAnnotatedType(tp, underlying1, annot1)
6486+
val underlying1 = this(underlying)
6487+
val annot1 = annot.mapWith(this)
6488+
if annot1 eq EmptyAnnotation then underlying1
6489+
else derivedAnnotatedType(tp, underlying1, annot1)
64946490

64956491
case _: ThisType
64966492
| _: BoundType

0 commit comments

Comments
 (0)