Skip to content

Adding a parameter breaks subclasses. #207

@mosuem

Description

@mosuem

Imagine the following setting in a package:foo.

Before

abstract class A {
  void someMethod();
}

After

abstract class A {
  void someMethod([int? i]);
}

This should be a breaking change as A is not final, but seems to be recognized as CE02 - minor. This was noticed in dart-lang/http#1725, when running

cd http/pkgs/http2
gh pr checkout 1725
dart-apitool diff --new . --old pub://http2

No breaking changes!
Non-Breaking changes
├─┬ Class TransportConnection
│ └─┬ Method terminate
│   └── Parameter "message" added (CE02) (minor)
├─┬ Class ClientTransportConnection
│ └─┬ Method terminate
│   └── Parameter "message" added (CE02) (minor)
└─┬ Class ServerTransportConnection
  └─┬ Method terminate
    └── Parameter "message" added (CE02) (minor)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions