Open pschachte opened 6 months ago
This code
resource to_parse:string def {partial} digit(?d:int) use !to_parse { to_parse = [?ch | ?to_parse] ch >= '0' & ch <= '9' ?d = ord(ch) - ord('0') } def {partial} integer(?i:int) use !to_parse { digit(?i) do { while (!digit(?d)) ?i = i * 10 + d } }
Gives this misleading error message:
examples.wybe:97:5: Type error in partial application of proc digit, argument 1 examples.wybe:97:5: Type error in call to proc digit, argument 1
The actual problem is that the ! is omitted at the front of the first call to digit.
!
digit
This code
Gives this misleading error message:
The actual problem is that the
!
is omitted at the front of the first call todigit
.