Superclass mismatch for class Dragon


#1

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
       ... 
      end
    end

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.


#2

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


#3

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


#4

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