Skip to content

Enforce that abstract methods aren't defined on an interface's singleton class #5

@amomchilov

Description

@amomchilov

This should raise:

module MyInterface
  interface!

  class << self
    abstract def foo; end # ❌
  end
end

See:

  1. https://sorbet.org/docs/abstract#abstract-singleton-methods
  2. Abstract singleton class methods are an abomination

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions