Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression in discard statement #9726

cooldome opened this issue Nov 15, 2018 · 1 comment


None yet
4 participants
Copy link

commented Nov 15, 2018

Regression introduced recently, the following valid code snippet no longer compiles

  ErrorHandler = proc(e: int): string {.nimcall.}

var handler: ErrorHandler

proc setHandler(newHandler: ErrorHandler): ErrorHandler =
  ## returns previous error handler
  result = handler
  handler = newHandler

proc myHandler(e: int): string =

discard setHandler(myHandler)

Regression introduced in 16353c2


This comment has been minimized.

Copy link

commented Nov 15, 2018

@krux02 Told ya you should check for n.sym in routineKinds.

@krux02 krux02 self-assigned this Nov 16, 2018

krux02 added a commit to krux02/Nim that referenced this issue Nov 20, 2018

@krux02 krux02 closed this in 39ad3a0 Nov 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.