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

Child class new item property test failure #100

Open
c-yuwei opened this issue Jul 20, 2023 · 0 comments
Open

Child class new item property test failure #100

c-yuwei opened this issue Jul 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@c-yuwei
Copy link
Collaborator

c-yuwei commented Jul 20, 2023

Describe the bug
The bug occurs in the "Test 2: Instantiation - defaults" test, where it fails to pass when a child class declares a new item property while the parent class already has a result property.

To Reproduce
Steps to reproduce the behavior:

  1. Create an element with a result property
image
  1. Create another element, inherited from the first element, with a new item property in it
image
  1. compile and run the test of that child element

Expected behavior
image
The test "Test 2: Instantiation - defaults" should run without errors. However, an error will occur in this test, specifically when the check on the new item property is performed. In the example provided, the 'SUB' property in the figure NNData_CON_REG(9) fails the check.

Desktop (please complete the following information):

  • OS: Windows

Additional context
The likely reason for this bug is that the item value from the initialized element is different from the item value from the default function. The difference arises because one of the item values is locked due to the result property being advanced compared to the item property. Consequently, when the initialized element goes through the result property, it locks the item property prematurely, leading to the failure in the "Test 2: Instantiation - defaults" test.

@c-yuwei c-yuwei added bug Something isn't working enhancement New feature or request labels Jul 20, 2023
@c-yuwei c-yuwei changed the title Defult check bug (polishing) Defult check bug (issue polishing...) Jul 20, 2023
@c-yuwei c-yuwei removed the enhancement New feature or request label Jul 20, 2023
@c-yuwei c-yuwei changed the title Defult check bug (issue polishing...) Child class new item property test failure Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant