Superclass mismatch for class Dragon

Hello there,

Following the instructions I created a “Dragon” class which inherits from “Creature” class and inside it I defined method “fight” which overrides the “fight” method of “Creature” class.

My code looks similar to this;

   class DerivedClass < BaseClass
       def OverrideMethod

But when I run the code, I am getting “superclass mismatch for class Dragon” error on console. What is the problem with this code?

Note: As soon as I refreshed my browser problem disappeared.

Can you please post your full code if you still need help?

@arjofocolovi After I refreshed my browser, I run my code once again and this time it worked as expected. Thank you.


Happened to me too. Don’t quite understand why, but a refresh did solve the problem.