MSIR.0861 Class (classname) repeatedly extended: Difference between revisions
Jump to navigation
Jump to search
(Automatically generated page update) |
mNo edit summary |
||
Line 1: | Line 1: | ||
A class declaration extended two classes that each extended the same class. | A class declaration extended two classes that each extended the same class. This is often (though not always) indicative of an error in the class hierarchy. For example, say the error occurs when class X tries to extend classes D and E which both extend class A. The problem might be corrected by these steps: | ||
<ol> <li>Create classes B and C so that class D extends B and A, and class E extends C and A. <li>Make class X extend classes C, B, and A.</ol> | <ol> | ||
<li>Create classes B and C so that class D extends B and A, and class E extends C and A. | |||
<li>Make class X extend classes C, B, and A. | |||
</ol> | |||
For more information, see [[Inheritance and polymorphism#Repeat inheritance|Repeat inheritance]]. | |||
[[Category:Sirius Mods messages]] | [[Category:Sirius Mods messages]] |
Revision as of 20:33, 23 April 2014
A class declaration extended two classes that each extended the same class. This is often (though not always) indicative of an error in the class hierarchy. For example, say the error occurs when class X tries to extend classes D and E which both extend class A. The problem might be corrected by these steps:
- Create classes B and C so that class D extends B and A, and class E extends C and A.
- Make class X extend classes C, B, and A.
For more information, see Repeat inheritance.