-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
error messagedetection and reporting of errors in Wybe codedetection and reporting of errors in Wybe code
Description
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
.
Metadata
Metadata
Assignees
Labels
error messagedetection and reporting of errors in Wybe codedetection and reporting of errors in Wybe code