Fix bugzilla 24803 - __traits(location) is inconsistent with modules

This commit is contained in:
Dennis Korpel 2024-10-10 11:33:00 +02:00 committed by The Dlang Bot
parent 2db13b18d4
commit 00df883e9f
10 changed files with 17 additions and 34 deletions

View file

@ -1,8 +1,9 @@
/*
TEST_OUTPUT:
---
fail_compilation/trait_loc_err.d(13): Error: can only get the location of a symbol, not `trait_loc_err`
fail_compilation/trait_loc_err.d(14): Error: can only get the location of a symbol, not `stdc`
fail_compilation/trait_loc_err.d(14): Error: can only get the location of a symbol, not `trait_loc_err`
fail_compilation/trait_loc_err.d(15): Error: can only get the location of a symbol, not `core.stdc`
fail_compilation/trait_loc_err.d(16): Error: can only get the location of a symbol, not `core.stdc.stdio`
---
*/
module trait_loc_err;
@ -12,4 +13,5 @@ void main()
{
__traits(getLocation, __traits(parent, main));
__traits(getLocation, __traits(parent, core.stdc.stdio));
__traits(getLocation, core.stdc.stdio);
}