Skip to content

Add implements keyword for Classes #1318

@markwpearce

Description

@markwpearce
  • Add a new keyword implements to explicitly say which interfaces a class conforms too.
  • A class can explicitly implement multiple interfaces
  • If a class uses the implements keyword, then validation is performed on the class to ensure that the set of its public members are compatible with all the interfaces referenced by the keyword.

Example:

interface Flier
    function takeOff(altitude as float) as boolean
end interface

interface Quacker
    sub quack()
end interface


class Duck implements Flier, Quacker    ' validation error - quack() is not included
    function takeOff(altitude as float) as boolean
       return false
   end function
end class

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions