Skip to content

Initialization of the field goes before instantiating an object in generated code #30

@EgorkaKulikov

Description

@EgorkaKulikov

Generate tests for ObjectWithStaticFieldExample.readFromStaticArray and consider the obtained code:

ObjectWithStaticFieldsClass.staticArrayValue = staticArrayValue;
ObjectWithStaticFieldsExample objectWithStaticFieldsExample = new ObjectWithStaticFieldsExample();
ObjectWithStaticFieldsClass objectWithStaticFieldsClass = new ObjectWithStaticFieldsClass();
objectWithStaticFieldsClass.y = -255;
objectWithStaticFieldsClass.x = -255;

Order of statements is a bit strange. It would be better if "objectWithStaticFieldsExample" will be the first or the last statement.

Metadata

Metadata

Assignees

Labels

comp-codegenIssue is related to code generator

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions