Skip to content

Improve isAccessible checks#1754

Merged
EgorkaKulikov merged 1 commit intomainfrom
andrey-t/isaccessible-improvement
Jan 27, 2023
Merged

Improve isAccessible checks#1754
EgorkaKulikov merged 1 commit intomainfrom
andrey-t/isaccessible-improvement

Conversation

@sofurihafe
Copy link
Copy Markdown
Member

@sofurihafe sofurihafe commented Jan 26, 2023

Description

Problematic scenario is described in pull#1685.

This PR improved isAccessibleFrom method by adding extra checks for the object on which the call (field accessing) happens in order to be able to deal with such situations.

Refers to # (1677)
Further work of pull#1685

How to test

Automated tests

utbot-samples; mostly AssembleModelGeneratorTests

Manual tests

  1. Launch Contest Estimator with the following settings:
timeLimit = 128
methodFilter = "spoon.support.reflect.code.CtAssignmentImpl.getAssigned"
projectFilter = listOf("spoon-core-7.0.0")
  1. Verify that the test compiles successfully and that there are necessary reflection usages instead of direct field accesses (see issue no. 1677).

@sofurihafe sofurihafe force-pushed the andrey-t/isaccessible-improvement branch from df651d2 to 33b3e92 Compare January 26, 2023 14:21
@sofurihafe sofurihafe added comp-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug labels Jan 26, 2023
@sofurihafe sofurihafe force-pushed the andrey-t/isaccessible-improvement branch 3 times, most recently from 92ed2e2 to 3d8257b Compare January 27, 2023 08:30
@sofurihafe sofurihafe marked this pull request as ready for review January 27, 2023 08:31
@sofurihafe sofurihafe force-pushed the andrey-t/isaccessible-improvement branch from 3d8257b to 76a2e21 Compare January 27, 2023 08:51
@sofurihafe sofurihafe force-pushed the andrey-t/isaccessible-improvement branch from 76a2e21 to 10d490f Compare January 27, 2023 10:17
@EgorkaKulikov EgorkaKulikov merged commit 9b2619a into main Jan 27, 2023
@EgorkaKulikov EgorkaKulikov deleted the andrey-t/isaccessible-improvement branch January 27, 2023 10:59
@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-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants