Ok, well at least I finally understand why it's failing. Now the question becomes what the least-disruptive way of working around this is.<br><br><div class="gmail_quote">On Wed, Apr 11, 2012 at 3:44 PM, Walter Bright <span dir="ltr"><<a href="mailto:walter@digitalmars.com">walter@digitalmars.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I looked into special case resolving the:<br>
<br>
template closureOf() {<br>
static if (is(typeof({<br>
BasicVector x;<br>
x.bar(x);<br>
}))) {}<br>
enum closureOf = 1;<br>
}<br>
<br>
as being an eponymous template anyway, since the static if adds no members, but if I look at scid I see:<br>
<br>
template closureOf( T ) {<br>
static if( isScalar!(Unqual!T) ) {<br>
enum closureOf = Closure.Scalar;<br>
} else static if( is( typeof(T.closure) : Closure ) ) {<br>
enum closureOf = T.closure;<br>
} else {<br>
static assert( false, T.stringof ~ " is not a valid expression." );<br>
}<br>
}<br>
<br>
and such a fix won't help scid. It cannot figure out which branch of static if to use because it is circular, and so it won't know the type of the eponymous template, so it cannot proceed to initialize lhsClosure, and so fails.<div class="HOEnZb">
<div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
dmd-beta mailing list<br>
<a href="mailto:dmd-beta@puremagic.com" target="_blank">dmd-beta@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/dmd-beta" target="_blank">http://lists.puremagic.com/<u></u>mailman/listinfo/dmd-beta</a><br>
</div></div></blockquote></div><br>