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)
Conflicts:
	src/func.c
  • Loading branch information
MartinNowak committed Apr 18, 2015
1 parent aa96f70 commit 3c4801c
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 @@ -5130,9 +5130,6 @@ void UnitTestDeclaration::semantic(Scope *sc)

protection = sc->protection;

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 3c4801c

Please sign in to comment.