'super()' cannot be qualified; superclass 'identifier' is not an inner class
The compiler detected a call to a superclass constructor using an instance of the superclass but the superclass is not an inner class. The usage of an instance of a superclass combined with the super keyword is only used when a superclass is an inner class.
The following example illustrates this error:
class Simple{
//Do something meaningful here
}
class NotSimple extends Simple
{
NotSimple(Simple smp){
smp.super();
/*error: cannot call 'super' with instance when
superclass does not contain inner classes*/
}
}
The following example shows the usage of a superclass instance with the super keyword:
class Simple{
//Do something here
class InnerClass{
int var1, var2;
}
}
public class NotSimple extends Simple.InnerClass{
NotSimple(Simple smp){
smp .super();
//This is OK!
}
}