@@ -1168,7 +1168,7 @@ object SymDenotations {
1168
1168
privateWithin : Symbol = null ,
1169
1169
annotations : List [Annotation ] = null )(implicit ctx : Context ) =
1170
1170
{ // simulate default parameters, while also passing implicit context ctx to the default values
1171
- val initFlags1 = (if (initFlags != UndefinedFlags ) initFlags else this .flags) &~ Frozen
1171
+ val initFlags1 = (if (initFlags != UndefinedFlags ) initFlags else this .flags)
1172
1172
val info1 = if (info != null ) info else this .info
1173
1173
if (ctx.isAfterTyper && changedClassParents(info, info1, completersMatter = false ))
1174
1174
assert(ctx.phase.changesParents, i " undeclared parent change at ${ctx.phase} for $this, was: $info, now: $info1" )
@@ -1483,17 +1483,7 @@ object SymDenotations {
1483
1483
1484
1484
/** Enter a symbol in given `scope` without potentially replacing the old copy. */
1485
1485
def enterNoReplace (sym : Symbol , scope : MutableScope )(implicit ctx : Context ): Unit = {
1486
- def isUsecase = ctx.docCtx.isDefined && sym.name.show.takeRight(4 ) == " $doc"
1487
- require(
1488
- (sym.denot.flagsUNSAFE is Private ) ||
1489
- ! (this is Frozen ) ||
1490
- (scope ne this .unforcedDecls) ||
1491
- sym.hasAnnotation(defn.ScalaStaticAnnot ) ||
1492
- sym.name.is(InlineAccessorName ) ||
1493
- isUsecase, i " trying to enter $sym in $this, frozen = ${this is Frozen }" )
1494
-
1495
1486
scope.enter(sym)
1496
-
1497
1487
if (myMemberCache != null ) myMemberCache.invalidate(sym.name)
1498
1488
if (! sym.flagsUNSAFE.is(Private )) invalidateMemberNamesCache()
1499
1489
}
@@ -1503,7 +1493,6 @@ object SymDenotations {
1503
1493
* @pre `prev` and `replacement` have the same name.
1504
1494
*/
1505
1495
def replace (prev : Symbol , replacement : Symbol )(implicit ctx : Context ): Unit = {
1506
- require(! (this is Frozen ))
1507
1496
unforcedDecls.openForMutations.replace(prev, replacement)
1508
1497
if (myMemberCache != null ) myMemberCache.invalidate(replacement.name)
1509
1498
}
@@ -1513,7 +1502,6 @@ object SymDenotations {
1513
1502
* someone does a findMember on a subclass.
1514
1503
*/
1515
1504
def delete (sym : Symbol )(implicit ctx : Context ) = {
1516
- require(! (this is Frozen ))
1517
1505
info.decls.openForMutations.unlink(sym)
1518
1506
if (myMemberCache != null ) myMemberCache.invalidate(sym.name)
1519
1507
if (! sym.flagsUNSAFE.is(Private )) invalidateMemberNamesCache()
0 commit comments