@@ -320,6 +320,9 @@ object Phases {
320
320
/** Can this transform change the parents of a class? */
321
321
def changesParents : Boolean = false
322
322
323
+ /** Can this transform change the base types of a type? */
324
+ def changesBaseTypes : Boolean = changesParents
325
+
323
326
def exists : Boolean = true
324
327
325
328
def initContext (ctx : FreshContext ): Unit = ()
@@ -333,6 +336,7 @@ object Phases {
333
336
334
337
private [this ] var mySameMembersStartId = NoPhaseId
335
338
private [this ] var mySameParentsStartId = NoPhaseId
339
+ private [this ] var mySameBaseTypesStartId = NoPhaseId
336
340
337
341
/** The sequence position of this phase in the given context where 0
338
342
* is reserved for NoPhase and the first real phase is at position 1.
@@ -353,6 +357,8 @@ object Phases {
353
357
// id of first phase where all symbols are guaranteed to have the same members as in this phase
354
358
final def sameParentsStartId : Int = mySameParentsStartId
355
359
// id of first phase where all symbols are guaranteed to have the same parents as in this phase
360
+ final def sameBaseTypesStartId : Int = mySameBaseTypesStartId
361
+ // id of first phase where all symbols are guaranteed to have the same base tpyes as in this phase
356
362
357
363
protected [Phases ] def init (base : ContextBase , start : Int , end : Int ): Unit = {
358
364
if (start >= FirstPhaseId )
@@ -366,6 +372,7 @@ object Phases {
366
372
myLabelsReordered = prev.getClass == classOf [LabelDefs ] || prev.labelsReordered
367
373
mySameMembersStartId = if (changesMembers) id else prev.sameMembersStartId
368
374
mySameParentsStartId = if (changesParents) id else prev.sameParentsStartId
375
+ mySameBaseTypesStartId = if (changesBaseTypes) id else prev.sameBaseTypesStartId
369
376
}
370
377
371
378
protected [Phases ] def init (base : ContextBase , id : Int ): Unit = init(base, id, id)
0 commit comments