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

Allow variables and functions to have dependent idexpr names. #27

Open
asutton opened this issue Jul 6, 2017 · 1 comment
Open

Allow variables and functions to have dependent idexpr names. #27

asutton opened this issue Jul 6, 2017 · 1 comment

Comments

@asutton
Copy link
Owner

asutton commented Jul 6, 2017

For example:

$class foo {
  int idexpr($foo.name() "_bar") = 0;
}

This is currently rejected because variables must have identifiers as names.

This raises an interesting question... how do we resolve references to these things? This is not an identifier, normal lookup mechanisms won't quite work. Leave them unresolved?

@asutton asutton changed the title Allow variables and functions to have dependent idexpr names. Allow variables and functions to have dependent idexpr names. Jul 6, 2017
@asutton
Copy link
Owner Author

asutton commented Jul 6, 2017

This hasn't been an issue because we've only been using idexpr within metaprograms. Those are not dependent when instantiated -- or at least they haven't been yet.

@asutton asutton closed this as completed Jul 6, 2017
@asutton asutton reopened this Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant