2020-06-30 12:47:33 +02:00
|
|
|
An inheritance list entry is redundant if:
|
2020-06-30 14:49:38 +02:00
|
|
|
|
2021-01-27 13:42:22 +01:00
|
|
|
* It is ``++Object++`` - all classes extend ``++Object++`` implicitly.
|
|
|
|
* It is ``++int++`` for an ``++enum++``
|
2020-06-30 12:47:33 +02:00
|
|
|
* It is a base class of another listed inheritance.
|
|
|
|
|
|
|
|
Such redundant declarations should be removed because they needlessly clutter the code and can be confusing.
|
|
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
|
|
|
|
----
|
|
|
|
public class MyClass : Object // Noncompliant
|
|
|
|
|
|
|
|
enum MyEnum : int // Noncompliant
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
----
|
|
|
|
public class MyClass
|
|
|
|
|
|
|
|
enum MyEnum
|
|
|
|
----
|
2021-06-02 20:44:38 +02:00
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
ifdef::env-github,rspecator-view[]
|
2021-06-08 15:52:13 +02:00
|
|
|
'''
|
2021-06-02 20:44:38 +02:00
|
|
|
== Comments And Links
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::comments-and-links.adoc[]
|
2021-06-03 09:05:38 +02:00
|
|
|
endif::env-github,rspecator-view[]
|