nim-works/nimskull

Internal assert when using a proc type with a single word as argument

Aperta

#1491 aperta il 21 gen 2025

 (1 commento) (0 reazioni) (0 assegnatari)Nim (39 fork)auto 404
bugcompiler/semgood first issue

Metriche repository

Star
 (346 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Specification

Syntax errors in proc types should give an explanation.

Example

# type X = object # turns out it does the same without this
var f: proc(X)

Actual Output

main.nim(2, 13) Fatal: Internal assert '' failed in semtypes.nim(1577, 15)
nim.nim(0)      nim
nim.nim(0)      handleCmdLine
main.nim(0)     mainCommand
main.nim(0)     compileToBackend
main.nim(0)     commandCompileToC
modules.nim(0)  compileProject
modules.nim(0)  compileModule
passes.nim(0)   processModule
passes.nim(0)   processTopLevelStmt
sem.nim(0)      myProcess
sem.nim(0)      semStmtAndGenerateGenerics
semstmts.nim(0) semStmt
semexprs.nim(0) semExprNoType
semexprs.nim(0) semExpr
semstmts.nim(0) semStmtList
semexprs.nim(0) semExpr
semstmts.nim(0) semConstLetOrVar
semstmts.nim(0) semNormalizedLetOrVar
semtypes.nim(0) semTypeNode
semtypes.nim(0) semProcTypeWithScope
semtypes.nim(0) semProcTypeNode
msgs.nim(0)     doInternalAssert
msgs.nim(0)     handleReport
msgs.nim(0)     quit

Expected Output

Something like:

Error: ':' expected

Guida contributor