37 lines
744 B
Common Lisp
37 lines
744 B
Common Lisp
(* The inheritance analysis has 2 stages, graph construction & cyclic checking.
|
|
it will abort if duplicate or undefined class definitions are found before do cyclic checking *)
|
|
-- uncomment the lines below to get convinced that 1st stage works
|
|
(*
|
|
class DupDef {};
|
|
|
|
class DupDef {};
|
|
|
|
class DupDef1 {};
|
|
|
|
class DupDef1 {};
|
|
|
|
class A inherits SCHEISSE{};
|
|
*)
|
|
(*
|
|
class D inherits D {};
|
|
|
|
class Cycle1 inherits Cycle2 {};
|
|
class Cycle2 inherits Cycle3 {};
|
|
class Cycle3 inherits Cycle1 {};
|
|
|
|
class Cycle4 inherits Cycle3 {};
|
|
*)
|
|
class Ok1{};
|
|
class Ok2_1 inherits Ok1 {};
|
|
class Ok2_2 inherits Ok1 {};
|
|
class Ok3 inherits Ok2_1 {};
|
|
class Ok4 inherits Ok2_2 {};
|
|
|
|
|
|
class Main inherits IO {
|
|
main(): Object {
|
|
{
|
|
a();
|
|
}
|
|
};
|
|
}; |