annotate compile/c/creal_37_B.d @ 1597:8b9d4d2f925a

Fix typos in complex tests. See D bug 614.
author Christian Kamm <kamm incasoftware de>
date Tue, 09 Sep 2008 16:53:58 +0200
parents daef239f37cf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1247
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
1 // $HeadURL$
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
2 // $Date$
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
3 // $Author$
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
4
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
5 // @author@ Sean Kelly <sean@f4.ca>
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
6 // @date@ 2006-11-27
1320
daef239f37cf sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents: 1247
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=614
1247
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
8 // @desc@ [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
9
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
10 module dstress.compile.c.creal_37_B;
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
11
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
12 const creal a = 1.0L + 2.0Li;
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
13
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
14 template getRealPart(creal x){
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
15 const real getRealPart = x.re;
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
16 }
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
17
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
18 static assert(getRealPart!(a) == 1.0L);
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
19
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
20
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
21 template getImaginaryPart(creal x){
1597
8b9d4d2f925a Fix typos in complex tests. See D bug 614.
Christian Kamm <kamm incasoftware de>
parents: 1320
diff changeset
22 const real getImaginaryPart = x.im;
1247
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
23 }
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
24
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
25 static assert(getImaginaryPart!(a) == 2.0L);