From c0ccf7fffeea0c75827f86acfb895652fbd8dffd Mon Sep 17 00:00:00 2001 From: Andrei Alexandrescu Date: Wed, 29 Dec 2010 13:34:45 +0000 Subject: [PATCH] Fix spurious message during compilation of Phobos --- std/algorithm.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/std/algorithm.d b/std/algorithm.d index 0997a7beb..1793e0f40 100644 --- a/std/algorithm.d +++ b/std/algorithm.d @@ -115,7 +115,9 @@ struct Map(alias fun, Range) if (isInputRange!(Unqual!Range)) { alias Unqual!Range R; alias fun _fun; - alias typeof(fun(.ElementType!R.init)) ElementType; + // Uncomment this to reveal a @@@BUG@@@ in the compiler + //alias typeof(fun(.ElementType!R.init)) ElementType; + alias typeof({ return fun(.ElementType!R.init); }()) ElementType; R _input; static if (isBidirectionalRange!(R))