strictly typecheck expressions in bracketed emit (#22074)

* strictly typecheck expressions in bracketed `emit`

* use nim check in test
This commit is contained in:
metagn
2023-06-13 13:04:24 +03:00
committed by GitHub
parent 2e12d3e26b
commit fda8b6f193
4 changed files with 15 additions and 1 deletions

View File

@@ -126,6 +126,7 @@ type
libs*: seq[PLib] # all libs used by this module
semConstExpr*: proc (c: PContext, n: PNode; expectedType: PType = nil): PNode {.nimcall.} # for the pragmas
semExpr*: proc (c: PContext, n: PNode, flags: TExprFlags = {}, expectedType: PType = nil): PNode {.nimcall.}
semExprWithType*: proc (c: PContext, n: PNode, flags: TExprFlags = {}, expectedType: PType = nil): PNode {.nimcall.}
semTryExpr*: proc (c: PContext, n: PNode, flags: TExprFlags = {}): PNode {.nimcall.}
semTryConstExpr*: proc (c: PContext, n: PNode; expectedType: PType = nil): PNode {.nimcall.}
computeRequiresInit*: proc (c: PContext, t: PType): bool {.nimcall.}