@@ -35,7 +35,9 @@ trait SymDenotations { this: Context =>
35
35
val result =
36
36
if (symbol.isClass)
37
37
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
+ }
39
41
else new ClassDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin, ctx.runId)
40
42
else new SymDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin)
41
43
result.validFor = stablePeriod
@@ -1207,6 +1209,8 @@ object SymDenotations {
1207
1209
*/
1208
1210
def copyCaches (from : SymDenotation , phase : Phase )(implicit ctx : Context ): this .type = this
1209
1211
1212
+ private [core] def invalidateCaches ()(implicit ctx : Context ): Unit = ()
1213
+
1210
1214
/** Are `info1` and `info2` ClassInfo types with different parents?
1211
1215
* @param completersMatter if `true`, consider parents changed if `info1` or `info2 `is a type completer
1212
1216
*/
@@ -1323,6 +1327,24 @@ object SymDenotations {
1323
1327
this
1324
1328
}
1325
1329
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
+
1326
1348
// ----- denotation fields and accessors ------------------------------
1327
1349
1328
1350
if (initFlags is (Module , butNot = Package ))
0 commit comments