Closed nagolove closed 1 year ago
I suspect the errors could get pretty longwinded if they print the entire function signatures. Perhaps using their names, such as (types of fields 'circle' and 'line' do not match)
?
@hishamhm Yes, only names are enough in most cases.
Patches are welcome! :grin:
I have some code like this:
And I get such message from compiler:
I have stumbled for time because of did not attended to function types. My idea is to write more complex message like:
In this message I have direct indication for first incompatible types pair. Implementation proposal: apply text templates in
match_all_record_field_names
function argument like"cannot index, not all enum values map to record fields of the same type( <f> ~= <t>)"
and replacing placeholders with real type names usingstring.gsub()
.