clang icon indicating copy to clipboard operation
clang copied to clipboard

Allow variables and functions to have dependent idexpr names.

Open asutton opened this issue 7 years ago • 1 comments

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 avatar Jul 06 '17 12:07 asutton

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 avatar Jul 06 '17 12:07 asutton