Skip to content

Commit

Permalink
Move issue 9679 test case to compilable/testparse.d
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Mar 29, 2015
1 parent a3aab33 commit a2ff3f2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
26 changes: 0 additions & 26 deletions test/compilable/parse9679.d

This file was deleted.

30 changes: 30 additions & 0 deletions test/compilable/testparse.d
Expand Up @@ -58,3 +58,33 @@ void test9649()
Outer9649 outer9649;
(outer9649).new Inner();
}

/***************************************************/
// 9679

void test9679(inout int = 0)
{
if ( auto n = 1) { static assert(is(typeof(n) == int)); }
if ( const n = 1) { static assert(is(typeof(n) == const int)); }
if ( immutable n = 1) { static assert(is(typeof(n) == immutable int)); }
if (shared n = 1) { static assert(is(typeof(n) == shared int)); }
if (shared const n = 1) { static assert(is(typeof(n) == shared const int)); }
if ( inout n = 1) { static assert(is(typeof(n) == inout int)); }
if (shared inout n = 1) { static assert(is(typeof(n) == shared inout int)); }

if ( const int n = 1) { static assert(is(typeof(n) == const int)); }
if ( immutable int n = 1) { static assert(is(typeof(n) == immutable int)); }
if (shared int n = 1) { static assert(is(typeof(n) == shared int)); }
if (shared const int n = 1) { static assert(is(typeof(n) == shared const int)); }
if ( inout int n = 1) { static assert(is(typeof(n) == inout int)); }
if (shared inout int n = 1) { static assert(is(typeof(n) == shared inout int)); }

if ( const(int) n = 1) { static assert(is(typeof(n) == const int)); }
if ( immutable(int) n = 1) { static assert(is(typeof(n) == immutable int)); }
if (shared (int) n = 1) { static assert(is(typeof(n) == shared int)); }
if (shared const(int) n = 1) { static assert(is(typeof(n) == shared const int)); }
if ( inout(int) n = 1) { static assert(is(typeof(n) == inout int)); }
if (shared inout(int) n = 1) { static assert(is(typeof(n) == shared inout int)); }

if (immutable(int)[] n = [1]) { static assert(is(typeof(n) == immutable(int)[])); }
}

0 comments on commit a2ff3f2

Please sign in to comment.