Skip to content

Add support for virtual invokes on enums #1746

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 25, 2023

Conversation

CaelmBleidd
Copy link
Member

@CaelmBleidd CaelmBleidd commented Jan 24, 2023

Description

Now we create enum instances without concrete type when it comes as a parameter into a function. This allows us to support virtual invokes on enum instances.

Also, this request contains some a fix related to resolving enum instances retrieved from concrete and its instantiation in the Resolver: we should use everywhere not a type for some enum constant, but a type of its superclass (since an enum constant is not an enum in accordance to java.lang.Class#isEnum). Corresponding comments are added to the code.

Fixes JIRA:1686, JIRA:1450

How to test

Automated tests

Tests from class org.utbot.examples.enums.ClassWithEnumTest

Manual tests

There are no manual tests.

Self-check list

Check off the item if the statement is true:

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@CaelmBleidd CaelmBleidd added comp-symbolic-engine Issue is related to the symbolic execution engine ctg-bug-fix PR is fixing a bug labels Jan 24, 2023
@CaelmBleidd CaelmBleidd requested a review from Damtev January 24, 2023 15:41
@CaelmBleidd CaelmBleidd self-assigned this Jan 24, 2023
@CaelmBleidd CaelmBleidd requested a review from Damtev January 25, 2023 08:39
@CaelmBleidd CaelmBleidd requested a review from Damtev January 25, 2023 09:42
@CaelmBleidd CaelmBleidd enabled auto-merge (squash) January 25, 2023 10:06
@CaelmBleidd CaelmBleidd merged commit 22badb4 into main Jan 25, 2023
@CaelmBleidd CaelmBleidd deleted the caelmbleidd/fix_absent_inheritors_for_enums branch January 25, 2023 10:36
@alisevych alisevych added this to the 2023.03 Release milestone Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-symbolic-engine Issue is related to the symbolic execution engine ctg-bug-fix PR is fixing a bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants