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

closure types with default values don't work in VM #21353

Closed
ringabout opened this issue Feb 11, 2023 · 2 comments · Fixed by #24070
Closed

closure types with default values don't work in VM #21353

ringabout opened this issue Feb 11, 2023 · 2 comments · Fixed by #24070
Assignees
Labels
VM see also `const` label

Comments

@ringabout
Copy link
Member

ringabout commented Feb 11, 2023

(var s: proc () = default(proc ()); doAssert s == nil)

I found it when debugging #21351. It doesn't work in VM, because the type of is not correct.

image

It will become ((nil, nil), (nil, nil)) instead of (nil, nil).

@ringabout ringabout added the VM see also `const` label label Feb 11, 2023
@juancarlospaco
Copy link
Collaborator

!nim c

(var s: proc () = default(proc ()); doAssert s == nil)

@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2023

@juancarlospaco (contributor)

devel :+1: OK

Output


Stats

  • Created 2023-07-08T22:22:45Z
  • Started 2023-07-08T22:23:17
  • Finished 2023-07-08T22:23:17
  • Duration 1 minute
  • Commands nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
stable :+1: OK

Output


Stats

  • Created 2023-07-08T22:22:45Z
  • Started 2023-07-08T22:23:18
  • Finished 2023-07-08T22:23:18
  • Duration 1 minute
  • Commands nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
1.6.0 :+1: OK

Output


Stats

  • Created 2023-07-08T22:22:45Z
  • Started 2023-07-08T22:23:21
  • Finished 2023-07-08T22:23:21
  • Duration 1 minute
  • Commands nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
1.4.0 :+1: OK

Output


Stats

  • Created 2023-07-08T22:22:45Z
  • Started 2023-07-08T22:23:24
  • Finished 2023-07-08T22:23:25
  • Duration 1 minute
  • Commands nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
1.2.0 :+1: OK

Output


Stats

  • Created 2023-07-08T22:22:45Z
  • Started 2023-07-08T22:23:40
  • Finished 2023-07-08T22:23:41
  • Duration now
  • Commands nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
1.0.0 :+1: OK

Output


Stats

  • Created 2023-07-08T22:22:45Z
  • Started 2023-07-08T22:23:53
  • Finished 2023-07-08T22:23:54
  • Duration now
  • Commands nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
🤖 Bug found in 41 minutes bisecting 6 commits at 0 commits per second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VM see also `const` label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants