annotate nocompile/invariant_05.d @ 59:96cadd0da1ae

added invariant tests
author thomask
date Fri, 22 Oct 2004 20:29:58 +0000
parents
children f87ba6507260
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
59
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
1 // invariant is only allowed in classes (dmd-0.104 documentation)
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
2
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
3 module dstress.nocompile.invariant_05;
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
4
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
5 invariant{
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
6 assert(0);
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
7 }
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
8
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
9 int dummy;
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
10
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
11 static this(){
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
12 dummy=4;
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
13 }
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
14
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
15 static ~this(){
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
16 dummy++;
96cadd0da1ae added invariant tests
thomask
parents:
diff changeset
17 }