Super type changes are not detected correctly
Changing a non-super-typed class to a super-typed class is detected as a type removal and type addition. This is rather hard to detect (it is rated as a complex transformation). Most probable cause is that the non super typed and super typed classes have different constructors. Assuming this, the detection is actually correct, yet I am not sure the result (and time to compute it) is desired.
Possible solutions are: decreasing the weight of type removal and addition (yet this most probably has consequences for other detections); desugaring non-super-typed classes to super-typed classes (yet this may have significant implications on the code); implementing specific functionality for detecting these types of changes (yet this is rather ugly).
Submitted by Sander Vermolen on 8 April 2010 at 15:23
Issue Log
Fixed. I changed the AST layout. Types and subtypes now use the same constructor (Type). Being a sub type is indicated using an optional super type declaration as child. This fixes the detection, since making types part of an inheritance hierarchy is now local transformation with respect to the type.
Log in to post comments