Skip to content

Commit

Permalink
Merge pull request #4609 from Geod24/leftover
Browse files Browse the repository at this point in the history
[2.067.1] Missing commit in master
  • Loading branch information
MartinNowak committed Apr 23, 2015
2 parents d55f2cf + bbe9fd2 commit 779e52c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/traits.c
Expand Up @@ -982,6 +982,11 @@ Expression *semanticTraits(TraitsExp *e, Scope *sc)
return 0;
}

if (sm->ident == Id::empty)
{
return 0;
}

//printf("\t%s\n", sm->ident->toChars());
Identifiers *idents = (Identifiers *)ctx;

Expand Down
15 changes: 15 additions & 0 deletions test/compilable/test14375.d
@@ -0,0 +1,15 @@
/*
TEST_OUTPUT:
---
---
*/
interface IKeysAPI(string greetings) {
static assert(greetings == "Hello world", greetings);
}

void main() {
foreach (method; __traits(allMembers, IKeysAPI!("Hello world"))) {
static assert (method.length, "Empty string from the compiler ??");
pragma(msg, method);
}
}

0 comments on commit 779e52c

Please sign in to comment.