Thu, 03 Jun 2010 18:30:04 -0400, bearophile wrote:

> Trass3r:
> 
>> void main()
>> {
>> }
>> 
>> unittest
>> {
>>      struct S
>>      {
>>              S2 s;
>>      }
> 
> Being unittests functions, it can be better to use "static struct" there
> instead of "struct".
> 
> -------------------------
> 
> Ellery Newcomer:
>> It's intentional. Forward references generally aren't allowed inside
>> function bodies.
> 
> Unittests being normal functions is an abstraction that leaks a bit, but
> I presume it's OK.

What does this mean? Can't you write a wrapper struct/class inside the 
block if you don't want to expose S and S2 outside the unittest block.

Reply via email to