Open bradunov opened 9 years ago
Ok the error message is quite uninformative (at the code generation, which is way too late), so I will fix that. Something that is puzzling for me is: why you did not define CCAParams at the top level and you chose instead to make a local struct definition?
We looked into it and decided it is still a bug. It is checked in as struct4.wpl in tests/backend, though it is made to pass. One only needs to uncomment one line to reproduce the bug.
I have a function fun comp cca(energy_threshold : int32) { ... } which returns some struct (struct CCAParams). And I call it in read >>> cca(200) >>> write. The problem here is that I haven't bound the return type, so I essentially have to write read >>> {cca(200); return()} >>> write to do this. But the actual error message for this is very uninformative: GenericError "CodeGen: Unbound struct type \"CCAParams\" detected!\nBound are: [\"complex16\",\"complex32\",\"complex64\",\"complex8\"