-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
usabilityThis ticket is related to improved usabilityThis ticket is related to improved usability
Description
I encountered an error while trying to set an ipv4 network on an entity:
Invalid value '172.25.103.22/24', does not match constraint `std::validate_type('ipaddress.IPv4Network',self)
But after some more investigation, it seems I forgot to use the network address. This was not correctly reported by the compiler. When I test the actual python type I get this:
>>> ipaddress.IPv4Network("172.25.103.22/24")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.12/ipaddress.py", line 1544, in __init__
raise ValueError('%s has host bits set' % self)
ValueError: 172.25.103.22/24 has host bits set
This would be good to report this in the compiler output error. Here is the minimal example I used to reproduce the error:
entity A:
std::ipv4_network net
end
implement A using std::none
A(net="172.25.103.22/24")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
usabilityThis ticket is related to improved usabilityThis ticket is related to improved usability