dataflow type checker: flaw in line and character referencing in warnings
vkothari opened this issue · 0 comments
The dataflow type checker ensures that attributes are assigned values by each rule's end. This seems to work correctly overall, but there's a minor issue in displaying warnings regarding uninitialized attributes. When running the type checker on an old version of udp.ply, I saw:
--- type checker output begin ---
./doc/tutorial/examples/udp.ply: parsed and typed.
File "./doc/tutorial/examples/udp.ply", line 18, characters 4-385:
attribute u of UDPPacket may be uninitialized at the end of this rule.
--- type checker output end ---
The line number corresponds to where the offending rule begins. However, that line has nowhere near 385 characters on it, if we assume a line is terminated with a newline character. Instead, I presume the output corresponds to lines after some pre-processing is done on the raw .ply file, wherein full rules that may be multiple lines in the .ply file are treated as a single line.