![]() |
.. (לתיקייה המכילה) | |
What should be the behavior of #multInheritsFrom: when sending it to/with OOPObject as parameter? | |
You can assume this won't be checked. OOPObject is only a tagging class that provides functionality to our mechanism, that means it isn't a part of the inheritance tree. #multInheritsFrom: result should be based on the superclasses array only (as it is the only container to hold information about our mechanism) |
When should classifyInheritedMethod return 'ambiguous'? | |
A method is considered ambiguous for a class A when there is more than one "path" to get to the method. The following case is also considered ambiguous: A B \ / C | D Where A, B and C are defining the method 'foo'. In C++ C will be considered a final overrider, thus eliminating the ambiguity. This is not the case in our mechanism - foo will still be considered ambiguous for D because there's a class (C) which foo is ambiguous for. |
When a class is inheriting from OOPObject, does classifyInheritedMethod need to consider methods it inherited via Squeak's original inheritance? | |
The answer is no. When a class inherits from OOPObject you should only check for methods defined in the class (not inherited to it). This is not the case when the class does not inherit from OOPObject (when that happens, all the methods that are inherited via Squeak's original mechanism are considered defined in that class) |
When there are no ambiguities, what should happen when overriding a method that was considered 'inaccessible' or 'private' in a lower class in the inheritance tree? | |
The overridden method should be classified as if it was only defined in the new class. (for that subtree) |
Can inherited methods (via our new mechanism) have return values? or arguments? | |
You can assume that return values won't be checked. However this is not the case regarding arguments - there are methods that receive arguments, and you should be able to handle that. If you're stuck: check the class of aMessage in doesNotUnderstand, you may find interesting things there :) |
When inheriting from a 'regular' class that understands a method (defined in a class that the class inherits from via Squeak's original mechanism) what instance should be returned in #multInheritsFrom? | |
The result should the class available in the superclassInstances array (the lowest class that understands that method) |