How to reproduce
Create an example project:
Change ExampleNode to Length:
$ sed -ie 's/ExampleNode/Length/' repro/language/parser.py
$ cd repro && python3 ./manage.py make
[...]
Compile
[Ada] parse.adb
parse.adb:137:44: "Length" is not visible
parse.adb:137:44: multiple use clauses cause hiding
parse.adb:137:44: hidden declaration at libreprolang-analysis.ads:88
parse.adb:137:44: hidden declaration at a-strunb.ads:92
compilation of parse.adb failed
gprbuild: *** compilation phase failed
Build failed: error while running gprbuild -p -j8 -P/home/senier/tmp/langkit/length_issue/repro/build/src/mains.gpr -XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -XGPR_BUILD=relocatable -XXMLADA_BUILD=relocatable parse.adb:
Command '['gprbuild', '-p', '-j8', '-P/home/senier/tmp/langkit/length_issue/repro/build/src/mains.gpr', '-XBUILD_MODE=dev', '-XLIBRARY_TYPE=relocatable', '-XGPR_BUILD=relocatable', '-XXMLADA_BUILD=relocatable', 'parse.adb']' returned non-zero exit status 4.
Expected behavior
Either reject Length as AST node name or (preferably) allow it's use in the parser by fully qualifying Ada.Strings.Unbounded.Length (maybe use clauses should be avoided in generated code alltogether).
Versions used
GNAT: Community 2020
Langkit: master (45df941)
How to reproduce
Create an example project:
Change
ExampleNodetoLength:Expected behavior
Either reject
Lengthas AST node name or (preferably) allow it's use in the parser by fully qualifyingAda.Strings.Unbounded.Length(maybeuseclauses should be avoided in generated code alltogether).Versions used
GNAT: Community 2020
Langkit: master (45df941)