Skip to content

Commit

Permalink
Update tests/lang_callable/generics/tauto_inference_failure_due_to_bo…
Browse files Browse the repository at this point in the history
…dy_error.nim

Co-authored-by: zerbina <100542850+zerbina@users.noreply.github.com>
  • Loading branch information
saem and zerbina authored Aug 29, 2024
1 parent 85e1410 commit 831fdf7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
discard """
description: "Fail lambda inference due to error within the body."
errormsg: "undeclared identifier: 'i'"
line: 11
line: 13
"""

# This is a regression test, ensure we report errors inside lambdas during
# inference

var x: seq[proc(i: int)]
x.add proc(e: auto) = echo i
proc test(p: proc(x: int)) =
discard

test proc(e: auto) = i

0 comments on commit 831fdf7

Please sign in to comment.