Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 57be9d1

Browse files
committed
core.math: Remove static linkage from toPrec instantiation tests
1 parent 0309cfd commit 57be9d1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/core/math.d

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,10 @@ T toPrec(T:real)(real f) { pragma(inline, false); return f; }
208208

209209
@safe unittest
210210
{
211-
static float f = 1.1f;
212-
static double d = 1.1;
213-
static real r = 1.1L;
211+
// Test all instantiations work with all combinations of float.
212+
float f = 1.1f;
213+
double d = 1.1;
214+
real r = 1.1L;
214215
f = toPrec!float(f + f);
215216
f = toPrec!float(d + d);
216217
f = toPrec!float(r + r);

0 commit comments

Comments
 (0)