Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve overloadings check in generated code #370#503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@Vassiliy-Kudryashov
Copy link
Member

@Vassiliy-KudryashovVassiliy-Kudryashov commentedJul 12, 2022
edited
Loading

Description

Check for classId was added

Fixes#370

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Manual Scenario

The example:

public interface I1 {}
public interface I2 {}
public class E implements I1, I2 {    public E() {    }}
public class A {    public void foo(I1 i1) {        System.out.println("I1@A : " + i1);    }}
import java.util.Objects;public class B extends A {    @Override    public void foo(I1 i1) {        Objects.requireNonNull(i1);        System.out.println("I1@B");    }}

Observed code in generated tests for class B:
b.foo(((I1) e));
Here you can see redundant casting that affects readability

Expected code in generated tests for class B:
b.foo(e);

Checklist (remove irrelevant options):

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • No new warnings

@Vassiliy-KudryashovVassiliy-Kudryashov linked an issueJul 12, 2022 that may beclosed by this pull request
@Vassiliy-KudryashovVassiliy-Kudryashovenabled auto-merge (squash)July 12, 2022 11:42
@Vassiliy-KudryashovVassiliy-Kudryashov deleted the Vassiliy-Kudryashov/370-improve-overloadings-check-in-generated-code branchJuly 13, 2022 11:09
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@DamtevDamtevDamtev approved these changes

Assignees

No one assigned

Labels

None yet

Projects

Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Improve overloadings check in generated code

3 participants

@Vassiliy-Kudryashov@Damtev

[8]ページ先頭

©2009-2025 Movatter.jp