Skip to content

Commit 3f84992

Browse files
authored
Fix Bugzilla 24472 - __traits(fullyQualifedName) is undocumented in spec (#3800)
1 parent a9f354b commit 3f84992

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

spec/traits.dd

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ $(GNAME TraitsKeyword):
8282
$(RELATIVE_LINK2 toType, $(D toType))
8383
$(RELATIVE_LINK2 initSymbol, $(D initSymbol))
8484
$(RELATIVE_LINK2 parameters, $(D parameters))
85+
$(RELATIVE_LINK2 fullyQualifiedName, $(D fullyQualifiedName))
8586

8687
$(GNAME TraitsArguments):
8788
$(GLINK TraitsArgument)
@@ -1156,6 +1157,22 @@ $(H3 $(GNAME parameters))
11561157

11571158
$(H2 $(LNAME2 symbols, Symbol Traits))
11581159

1160+
$(H3 $(GNAME fullyQualifiedName))
1161+
1162+
$(P Gets the fully qualified name of a type or symbol.)
1163+
1164+
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
1165+
-----------------
1166+
module myModule;
1167+
1168+
int i;
1169+
static assert(__traits(fullyQualifiedName, i) == "myModule.i");
1170+
1171+
struct MyStruct {}
1172+
static assert(__traits(fullyQualifiedName, const MyStruct[]) == "const(myModule.MyStruct[])");
1173+
-----------------
1174+
)
1175+
11591176
$(H3 $(GNAME isNested))
11601177

11611178
$(P Takes one argument.

0 commit comments

Comments
 (0)