--TEST-- Inheritance failure because Y inherits from wrong class --FILE-- --EXPECTF-- object(A)#2 (0) { } object(Y)#2 (0) { } Fatal error: Declaration of B::m2(): Y must be compatible with A::m2(): B in %s on line %d