Inspectopedia
 
2024.3

Wrong arguments to call super

Warning
New
Last modified: 03 December 2024

Reports cases when any call to super(A, B) does not meet the following requirements:

  • B is an instance of A

  • B a subclass of A

Example:

As a fix, you can make the Square an instance of the Rectangle class.