[dmd-beta] dmd 1.074 and 2.059 beta 5

David Simcha dsimcha at gmail.com
Wed Apr 11 12:49:16 PDT 2012


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.

On Wed, Apr 11, 2012 at 3:44 PM, Walter Bright <walter at digitalmars.com>wrote:

> I looked into special case resolving the:
>
> template closureOf() {
>  static if (is(typeof({
>    BasicVector x;
>    x.bar(x);
>  }))) {}
>  enum closureOf = 1;
> }
>
> as being an eponymous template anyway, since the static if adds no
> members, but if I look at scid I see:
>
> template closureOf( T ) {
>        static if( isScalar!(Unqual!T) ) {
>                enum closureOf = Closure.Scalar;
>        } else static if( is( typeof(T.closure) : Closure ) ) {
>                enum closureOf = T.closure;
>        } else {
>                static assert( false, T.stringof ~ " is not a valid
> expression." );
>        }
> }
>
> 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.
>
>
> ______________________________**_________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/**mailman/listinfo/dmd-beta<http://lists.puremagic.com/mailman/listinfo/dmd-beta>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20120411/dc765fff/attachment.html>


More information about the dmd-beta mailing list