Table of Contents

VBC09329 — Object module needs to implement all members of its interface

Severity: Error  ·  Family: VBC (static semantics / abstract syntax tree)  ·  Source metadata: VBCompileErrorInfo

A class module that implements an interface does not declare the implemented name that corresponds to one of the interface's public variables or methods.

MS-VBAL §5.2.4.2 Implements Directive requires an implemented name declaration, named InterfaceName_MemberName, for each public method of the interface class, and for each public variable the property declarations its declared type calls for.

This code is raised by ImplementsSemantics. The verbose detail names the member and the declaration the module is missing.

How it is raised

Interface member What the module must declare
Public Sub Draw() Sub IShape_Draw()
Public Function Area() As Double Function IShape_Area() As Double
Public Property Get, Let or Set The same accessor, with the same name prefix
A public variable that is a Variant A Property Get, a Property Let and a Property Set
A public variable that is an Object or a class A Property Get and a Property Set
A public variable of any other type A Property Get and a Property Let

Notes

A Private member of the interface is not part of what is implemented, and is not required. A member the module does declare, but wrongly, is not reported as missing: what is wrong with it is VBC09330.

The Class interface that every class module implements (RD-VBAL §5.3.1.10) requires nothing: each of its members has an implementation of its own.

See also


⏮️ VBC09328 Invalid Implements directive | ⏭️ VBC09330 Invalid implemented member


ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca