Nim: illegal proc with untyped param causes internal error instead of error message

Created on 1 Nov 2018  路  3Comments  路  Source: nim-lang/Nim

BUG1:

this gives internal error instead of regular CT error
Error: internal error: getTypeDescAux(tyExpr)
for this:

proc foo(a: untyped)=discard
foo(0)

BUG2:

this is accepted but should give regular CT error as in above case

proc foo(a: untyped)=discard
Error messages

Most helpful comment

I am optimizing titles for reading, not for search. When I see the issue title I want to know what it is about. I don't want to dig through details. This means no unsupported markup like :(`) or internal symbols like getTypeDescAux unless they are the cause of the problem.

All 3 comments

@krux02 verbatim error messages (eg internal error: getTypeDescAux(tyExpr)) are much more useful than generic ones (eg illegal proc) when searching for issues; yes it's in the body of the issue but won't work for in:title queries
your 2nd change proc foo(a: untyped) => illegal proc with untyped param is fine though, since it's less likely to be 100% match to another use case

I am optimizing titles for reading, not for search. When I see the issue title I want to know what it is about. I don't want to dig through details. This means no unsupported markup like :(`) or internal symbols like getTypeDescAux unless they are the cause of the problem.

There is a fulltext search anyway, no need to restrict the search to titles.

Was this page helpful?
0 / 5 - 0 ratings