mita icon indicating copy to clipboard operation
mita copied to clipboard

Error message is confusing when functions are used incorrectly

Open tkutz opened this issue 5 years ago • 1 comments

Current behavior: Error messages for wrong function usage (incorrect types) do not specify which types are expected. Instead it says: Function length cannot be used here: uint32, A

Expected behavior: State which types are expected for the used function. Also A is confusing.

Related code:

var x : stdlib.int16 = 10;
var y : stdlib.int16 = x.length();

tkutz avatar Mar 20 '19 12:03 tkutz

The A here refers to a free type variable. I'll try to improve this error message by looking at possible instances.

wegendt-bosch avatar Mar 25 '19 09:03 wegendt-bosch