Skip to content
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

Enum classes are instantiated correctly if some methods are overriden #1408

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

EgorkaKulikov
Copy link
Collaborator

@EgorkaKulikov EgorkaKulikov commented Nov 22, 2022

Description

Sometimes enum constants override some methods of their enum
So we have an instance of anonymous class instead of enum, that can't be instantiated with Class.forName

Fixed in accordance with an advice from DimaTimofeev
image

Fixes # (1210)

Type of Change

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

How Has This Been Tested?

Automated Testing

standard utbot-pipeline

Manual Scenario

standard enum regression testing

@EgorkaKulikov EgorkaKulikov linked an issue Nov 22, 2022 that may be closed by this pull request
@volivan239 volivan239 force-pushed the egor/enum_constants_bug branch from 0bdea7a to 70f0aee Compare November 23, 2022 15:02
@volivan239 volivan239 force-pushed the egor/enum_constants_bug branch from 70f0aee to 398edf1 Compare November 23, 2022 15:12
Copy link
Collaborator

@volivan239 volivan239 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As org.utbot.examples.enums.ComplexEnumExamplesTest#testFindState is working correctly, it is now needed to think if #617 is closed by this.

@EgorkaKulikov EgorkaKulikov enabled auto-merge (squash) November 23, 2022 15:26
@EgorkaKulikov EgorkaKulikov merged commit 9d08eb8 into main Nov 23, 2022
@EgorkaKulikov EgorkaKulikov deleted the egor/enum_constants_bug branch November 23, 2022 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enum class is addressed incorrectly
2 participants