[YANGTOOLS-385] Union objects are generated incorrectly when using bits type Created: 05/Dec/14 Updated: 10/Apr/22 Resolved: 23/Jan/15 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Michal Polkorab | Assignee: | Martin Ciglan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 2480 |
| Description |
|
I have defined following model: typedef port-state-v13 { bit blocked { //description "Port is blocked"; position 1; }bit live { //description "Live for Fast Failover Group."; position 2; } } typedef port-state-v10 { bit blocked { description "Port is blocked"; position 1; }bit live { description "Live for Fast Failover Group."; position 2; }bit stp_listen { description "Not learning or relaying frames."; }bit stp_learn { description "Learning but not relaying frames."; }bit stp_forward { description "Learning and relaying frames."; }bit stp_block { description "Not part of spanning tree."; }bit stp_mask { description "Bit mask for OFPPS_STP_* values."; } } typedef port-state { } Code generation succeeds, but compilation of PortState object fails due to incorrect method call: |
| Comments |
| Comment by Martin Ciglan [ 05/Dec/14 ] |
|
replicated, will take a look next week |
| Comment by Martin Ciglan [ 10/Dec/14 ] |
|
fix pushed: |
| Comment by Jozef Gloncak [ 11/Dec/14 ] |
|
Just for completion. Problem was that class generated for typedef port-state was generated with constructors which expect that attribute _value is filled via calling of method getValue(). Such method currently isn't generated for >>bit<< type and therefore compilation error has occured. |
| Comment by George Zhao [ 19/Jan/15 ] |
|
move to Lithium |