Closed dionisiydk closed 5 years ago
@dionisiydk
Usually the pattern is to compare the class name and not the class itself:
isAbstract
^self name = #ClassNameAsSymbol
This is also more flexible than a hardcoded reference (for mocks or others)
I think it was related to old tools issues in old Squeak versions. Like load or remove class with such self references. Why we can't use simple comparison here? In fact most of implementors do this way. (I don't see how any mocks can be used here because it is internal method of concrete class)
Remove odd isAbstract implementation with "^self subclasses notEmpty". It should be always explicit pattern "^self = MyClassName".
I checked number of abstract classes before and after change. It's same