Skip to content

Take care of callability of static functions #10

Description

@fredreichbier

by @nddrylliog related to #9:

Note that 'final' static functions (such as 'new') shouldn't be callable from a subclass. For example:

Foo: class {
  init: func
}

Bar: class {
  init: func (a: Int)
}

Foo new() // builds a Foo
Bar new(42) // builds a Bar
Bar new() // compilation error - previously used to (erroneously) build a Foo instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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