mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
add ghci like type annotation buildEchoStmt (1049) (#18875)
* add ghci like type annotation buildEchoStmt (1049) * Update compiler/semexprs.nim * Update compiler/semexprs.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
This commit is contained in:
@@ -1057,6 +1057,7 @@ proc buildEchoStmt(c: PContext, n: PNode): PNode =
|
||||
else:
|
||||
result.add localErrorNode(c, n, "system needs: echo")
|
||||
result.add(n)
|
||||
result.add(newStrNode(nkStrLit, ": " & n.typ.typeToString))
|
||||
result = semExpr(c, result)
|
||||
|
||||
proc semExprNoType(c: PContext, n: PNode): PNode =
|
||||
|
||||
Reference in New Issue
Block a user