Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #149: static_array_null.d

File static_array_null.d, 263 bytes (added by dhasenan, 13 years ago)

test case

Line 
1 module dunittests.testfixturetests;
2
3 void main ()
4 {
5     bool b;
6     int[2] i; // also works with string literals
7     static if (is (typeof (i is null)))
8     {
9         if (i is null)
10         {
11             // this is to prevent the conditional from being
12             // optimized out
13             b = true;
14         }
15     }
16 }
Copyright © 2008, LDC Development Team.