VBC09330 — Invalid implemented member
Severity: Error · Family: VBC (static semantics / abstract syntax tree) ·
Source metadata: VBCompileErrorInfo
A procedure named for a member of an implemented interface, InterfaceName_MemberName, does not correspond to that member.
MS-VBAL §5.3.1.9 Implemented Name Declarations gives what it must be: the kind of declaration its member is, with an equivalent parameter list, and the same type.
This code is raised by
ImplementsSemantics. The verbose detail names the
declaration, the member and what is different.
How it is raised
| Situation | Example, for Public Function Area(ByVal Scale As Double) As Double |
Resolution |
|---|---|---|
| It is another kind of declaration. | Sub IShape_Area(ByVal Scale As Double) |
Declare a function. A subroutine is implemented by a subroutine, and each property accessor by the same accessor. |
| The member is a variable, and this is not a property. | Sub IShape_Title(), for Public Title As String |
Declare Property Get, and Property Let or Set. |
It has another number of parameters, or an Optional or a ParamArray that the member does not have, or the member has one it does not. |
Function IShape_Area() As Double |
Declare the member's parameters. |
| A parameter is of another type, or passed by another mechanism. | (ByRef Scale As Double) |
Declare the member's type and mechanism. |
The function, the Property Get, or the value of a Property Let or Set is of another type than the member's. |
Function IShape_Area(ByVal Scale As Double) As Long |
Declare the member's type. |
Notes
The parameters may differ in their names, and in whether the mechanism is written out: Count As Long implements ByRef Count As Long.
A procedure that begins with an interface's prefix but is not named for one of its members is not an implemented name declaration of anything, and is not checked.
The default value of an Optional parameter must be the same constant; only a literal default is compared.
See also
- VBC09328 — an
Implementsdirective that is not valid - VBC09329 — a member of the interface the module does not implement
- RD-VBAL §2.6.2 Semantic Compilation Errors
- RD-VBAL §5.3.1.9 Implemented Name Declarations
⏮️ VBC09329 Object module needs to implement all members of its interface | ⏭️ VBC09331 Sub or Function not defined
ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca