A class that inherits an interface from its ancestor (the ancestor declares
the interface; the descendant does not re-list it) was not recognised as
implementing it. `g := TLoud.Create` where TLoud < TPerson(IGreeter) failed
with "Type mismatch", and after the semantic gate was opened the codegen
referenced a non-existent itab.
Three coordinated fixes:
- uSemantic (CheckTypesMatch): the class->interface compatibility check
scanned only the class's own ImplementsList. It now walks the whole class
parent chain, so a descendant inherits its ancestors' interface
implementations.
- blaise.codegen.qbe / blaise.codegen.native (EmitInterfaceDefs): itab/impllist
generation likewise only considered a class's own ImplementsList, so no itab
was emitted for an inherited interface. Both backends now:
* skip a class only when neither it nor any ancestor implements an
interface (and, on native, point the typeinfo at the impllist on the same
condition);
* collect implemented interfaces by walking the class parent chain;
* resolve each itab method ref via the vtable slot's ImplName, so an
overridden method points at the descendant's body and an inherited
(non-overridden) method at the ancestor's — uniformly correct across
arbitrary inheritance depth.
Tests (cp.test.e2e.interfaces.pas, dual-backend via AssertRunsOnAll): the
exact issue repro (descendant assigned to an interface var, dispatching to its
override), and a three-level chain through an interface parameter mixing an
overridden method with an inherited non-overridden one.
Verified: FIXPOINT_OK, NATIVE_FIXPOINT_OK, NATIVE_INTERNAL_OK; full suite green
on both the QBE-built and native-built runners (3695 tests).