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

User defined property default for array type causes exception #180

Closed
markcohen32 opened this issue Jul 6, 2023 · 2 comments
Closed

User defined property default for array type causes exception #180

markcohen32 opened this issue Jul 6, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@markcohen32
Copy link

markcohen32 commented Jul 6, 2023

Describe the bug
I'm trying to add a user-defined property of string[] or just string type and use it in one of my registers with its default value.
When I try to access it by using get_property(<udp>) I get 'None'

Details like these can be helpful:

property myUDP    { type = string ; component = reg; default = "STR";}; 

RDL code:

reg reg1 {
      myUDP;
};
reg1 reg1_instance;

I expect that if no value was assigned to this UDP, I would get "STR" as a result of the method.

@amykyta3
Copy link
Member

amykyta3 commented Jul 19, 2023

I confirm that the compiler throws an exception if a UDP with type = string[] is used. That should be supported and is definitely a bug. This is related to an incomplete fix for #147 .

However I do not see any issue with the non-array example you show. I do indeed see that with type = string, the property resolves as expected: reg1_instance->myUDP == "STR"

@amykyta3 amykyta3 added the bug Something isn't working label Jul 19, 2023
@amykyta3 amykyta3 self-assigned this Jul 19, 2023
@amykyta3 amykyta3 changed the title User defined property of list type isn't shown in get_property method User defined property of array type causes exception Jul 19, 2023
@amykyta3 amykyta3 changed the title User defined property of array type causes exception User defined property default for array type causes exception Jul 20, 2023
@amykyta3
Copy link
Member

amykyta3 commented Aug 4, 2023

Fixed in 1.26.1

@amykyta3 amykyta3 closed this as completed Aug 4, 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

2 participants