Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Incorrect formatting of class extends expression #34

@jbms

Description

@jbms

clang-format does not handle class definitions where the extends clause is an expression more complicated than a sequence of dot-separated identifiers:

Expected output:

function identity<T>(x: T) {
  return x;
}
class A {};
class B extends (A) {};
class C extends identity(A) {};

Actual output:

function identity<T>(x: T) {
  return x;
}
class A {};
class B extends
(A){};
class C extends identity
(A){};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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