Skip to content

Commit

Permalink
Merge pull request #4593 from 9rnsr/fix14424
Browse files Browse the repository at this point in the history
[REG2.066] Issue 14424 - dmd crashes with __traits(getUnitTests)
  • Loading branch information
andralex committed Apr 18, 2015
2 parents 5bad2ac + cb1b813 commit 5f2bfa0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/func.c
Expand Up @@ -5174,9 +5174,6 @@ void UnitTestDeclaration::semantic(Scope *sc)
return;
}

if (inNonRoot())
return;

if (global.params.useUnitTests)
{
if (!type)
Expand Down
13 changes: 13 additions & 0 deletions test/fail_compilation/ice14424.d
@@ -0,0 +1,13 @@
// REQUIRED_ARGS: -o- -unittest
/*
TEST_OUTPUT:
---
fail_compilation/ice14424.d(12): Error: tuple has no effect in expression (tuple(__unittestL3_1))
---
*/

void main()
{
import imports.a14424;
__traits(getUnitTests, imports.a14424);
}
3 changes: 3 additions & 0 deletions test/fail_compilation/imports/a14424.d
@@ -0,0 +1,3 @@
module imports.a14424;

unittest { }

0 comments on commit 5f2bfa0

Please sign in to comment.