eclipse-jdt / eclipse-jdt/eclipse.jdt.core

MR compilation should validate the contract for MR types

Open
#4,274 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

The contract for a MR type is that its public API must be the same across all versions.

Now consider the following situation with the default type be:

```
MRType {

public String sayHello();

}
```

in a further `Version X` becomes

```
MRType {

public String sayHello(Locale locale);

}
```

this would be forbidden because code calling `MRType.sayHello()` will fail when running on `Version X` with method not found.

There should be a check that tell the user about the situation in this case it must complain that the public method `sayHello()` was removed in version X.

Similar things can happen for parameters, return types, fields and so on.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.