@@ -35,7 +35,9 @@ trait SymDenotations { this: Context =>
3535 val result =
3636 if (symbol.isClass)
3737 if (initFlags is Package ) new PackageClassDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin, ctx.runId)
38- else if (name.toString == " AndType" ) new ClassXDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin, ctx.runId)
38+ else if (name.toString == " AndType" && ctx.runId == 3 ) {
39+ new ClassXDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin, ctx.runId)
40+ }
3941 else new ClassDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin, ctx.runId)
4042 else new SymDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin)
4143 result.validFor = stablePeriod
@@ -1207,6 +1209,8 @@ object SymDenotations {
12071209 */
12081210 def copyCaches (from : SymDenotation , phase : Phase )(implicit ctx : Context ): this .type = this
12091211
1212+ private [core] def invalidateCaches ()(implicit ctx : Context ): Unit = ()
1213+
12101214 /** Are `info1` and `info2` ClassInfo types with different parents?
12111215 * @param completersMatter if `true`, consider parents changed if `info1` or `info2 `is a type completer
12121216 */
@@ -1323,6 +1327,24 @@ object SymDenotations {
13231327 this
13241328 }
13251329
1330+ override private [core] def invalidateCaches ()(implicit ctx : Context ): Unit = {
1331+ println(i " invalidate: $name" )
1332+ invalidateBaseDataCache()
1333+ invalidateMemberNamesCache()
1334+ invalidateBaseTypeCache()
1335+ myMemberCache = null
1336+ myMemberCachePeriod = Nowhere
1337+ fullNameCache = SimpleMap .Empty
1338+ myTypeParams = null
1339+ val invalidated = new java.util.IdentityHashMap [Symbol , Symbol ]
1340+ info.decls.foreach { sym =>
1341+ if (invalidated.get(sym) == null ) {
1342+ invalidated.put(sym, sym)
1343+ sym.invalidateCaches()
1344+ }
1345+ }
1346+ }
1347+
13261348 // ----- denotation fields and accessors ------------------------------
13271349
13281350 if (initFlags is (Module , butNot = Package ))
0 commit comments