Skip to content

raises tracking broken for... proc types in tables? #17382

@arnetheduck

Description

@arnetheduck

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions