mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 02:12:11 +00:00
* fixes #10838 * reject func in types instead * trigger tests
This commit is contained in:
@@ -1109,6 +1109,8 @@ proc parseProcExpr(p: var TParser; isExpr: bool; kind: TNodeKind): PNode =
|
||||
result = newNodeI(nkProcTy, info)
|
||||
if hasSignature:
|
||||
addSon(result, params)
|
||||
if kind == nkFuncDef:
|
||||
parMessage(p, "func keyword is not allowed in type descriptions, use proc with {.noSideEffect.} pragma instead")
|
||||
addSon(result, pragmas)
|
||||
|
||||
proc isExprStart(p: TParser): bool =
|
||||
|
||||
Reference in New Issue
Block a user