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

reorder:on fails with quoted proc #8801

Closed
timotheecour opened this issue Aug 29, 2018 · 2 comments
Closed

reorder:on fails with quoted proc #8801

timotheecour opened this issue Aug 29, 2018 · 2 comments

Comments

@timotheecour
Copy link
Member

# Error: undeclared identifier: 'foo'

{.reorder: on.}

proc bar*() = foo()

# likwise with: 
# proc `/`(head, tail: string) = bar()

# this would work
# proc foobar() = bar()

proc `foobar`() = bar()


proc foo*() = discard

NOTE: this seems related to #8800 but not identical

@Araq
Copy link
Member

Araq commented Aug 29, 2018

Fortunately reorder: on is not even documented.

@Araq
Copy link
Member

Araq commented Feb 7, 2020

For now this works as designed, see the snippet

      elif j < i and niHasBody and nj.hasAccQuotedDef:
        # Every function, macro, template... with a body depends
        # on precedent function declarations that have quoted names.
        # That's because it is hard to detect the use of functions
        # like "[]=", "[]", "or" ... in their bodies.

Tough problem to solve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants