-
- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
not sure how to interpret this one really.. table.[]= raises nothing and in the example, handler is not being called - yet, a raises CatchableError (or whatever Handler is declared to raise) is deduced and violated.
{.push raises: [Defect].} import tables type Handler = proc() {.raises: [Defect, CatchableError].} proc f*(table: var Table[string, Handler], name: string, handler: Handler) = table[name] = handler /usercode/in.nim(8, 1) template/generic instantiation from here /usercode/in.nim(9, 8) Error: can raise an unlisted exception: CatchableError nim 1.2.6, latest (https://play.nim-lang.org/#ix=2SVf)