Skip to content

free is always an override in classes #129

Description

@davidhesselbom

For any class in other than Object, this is a valid implementation of free in a class:

free: override func {
    [clean up your mess]
    super()
}

This is not:

free: func {
    [clean up your mess]
}

and neither is this:

free: override func {
    [clean up your mess]
    // no super
}

Also, this is useless:

free: override func {
    super()
}

Magic should be able to detect when a class has an invalid free function, but it will require that magic knows it's looking at a class, and not a cover, because those rules don't apply there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions