Skip to content

Codegen produces incorrect code for field access if the field is hidden #646

@volivan239

Description

@volivan239

Description

If there is a class with some fields hidden and we need to access these fields inside tests, the generated code is incorrect.

To Reproduce

Launch HiddenFieldExampleTest or HiddenFieldAccessModifiersTest (you should enable testingCodeGeneration by editing lines under the TODOs)

Expected behavior

Tests passed.

Actual behavior

Generated code is incorrect (in one case it is not compilable, in the other it has wrong tests).

Additional context

This is a sub-issue for #563, look there for more information and examples

Metadata

Metadata

Labels

comp-codegenIssue is related to code generatorctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions