Skip to content

Metaclasses appear to be completely ignored #41

@davidchisnall

Description

@davidchisnall

In the most recent head (and possibly some earlier ones), even trivial examples fail. It appears that the metaclass definitions are not being applied at all. For example, in the interface example, adding an int to the interface does not generate an error; however, the Circle class that is a subclass of the interface generates the following two errors:

interface.cc:54:22: error: only virtual member functions can be marked 'override'
    int area() const override { return 1; }
                     ^~~~~~~~~
interface.cc:55:34: error: only virtual member functions can be marked 'override'
    void scale_by(double factor) override { }
                                 ^~~~~~~~~
2 errors generated.

It appears as if any metaclass name is treated as equivalent to class. This is compiling with -std=c++1z -Xclang -reflection. It appears that the metaclass definition is being parsed, but is then ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions