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

const table with proc type does not compile anymore #11479

Closed
Araq opened this issue Jun 11, 2019 · 3 comments

Comments

@Araq
Copy link
Member

commented Jun 11, 2019

The following snippet does not compile anymore:

import tables

proc test() =
  echo readfile(currentSourcePath())

const
  map = {
    "test": test,
  }.toTable

map["test"]()

See also: https://forum.nim-lang.org/t/4926

@narimiran

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

git bisect shows that the first bad commit is c3067e3

@Araq

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2019

@narimiran But that makes no sense, it should be a different commit.

@narimiran

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

But that makes no sense

I've tested it manually and the commit before that one (and I tested even some previous commits too) compiles and prints the output, and starting from that one, it fails to compile.

Here is a list of commits around the bisected one, maybe you'll find something else that might be suspicious to you.

Araq added a commit that referenced this issue Jul 2, 2019

@Araq Araq closed this in 71b7383 Jul 3, 2019

narimiran added a commit that referenced this issue Jul 8, 2019

fixes #11479 (#11641)
(cherry picked from commit 71b7383)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.