GaloisInc / daedalus

The Daedalus data description language
BSD 3-Clause "New" or "Revised" License
63 stars 11 forks source link

Mis-located type errors #358

Open sauclovian-g opened 9 months ago

sauclovian-g commented 9 months ago

Running Daedalus show-types on the attached fragment reports a type error on line 73; in particular, it says that the parser Elf32ShdrTable is 32 bits wide when it expected 64. Except... it's a parser function. The actual problem is two functions down in ElfShdrTable where the 32-bit values passed in need to be widened to 64 to be used with Take/Drop and Many. Or alternatively it's one function down where the 32-bit values are passed to 64-bit arguments. But not at the call site reported...

This is not a super-critical problem but it's definitely a bug :-)

(The example is a cut-down fragment of part of an ELF file grammar)

bug2.ddl.txt