Aldo Nunez <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Aldo Nunez <> 2010-03-14 00:49:48 
PST ---
I get the same error, but in a slightly different context. I tried the case
from ZY Zhou on DMD 2.041, and it still fails.

The different case that I'm seeing is this.

This links fine.
    real y = 99.5L;
    ulong x = cast(ulong) y;

But if I put it after the following call, I get the link error.
    BinOp!(ulong, real).P( 99L );
    // where P is defined like this
    template BinOp(T, U)
        void Q( U u )    {}
        void P( T t )    { Q( cast(U) t ); }

Then compiling with -O gets rid of the error. I do have a case where the error
doesn't go away with the -O flag. The following is all in main.
    BinOp!(ulong, real).P( 99L );
    real y = 99.5L;
    void Q( ulong l )
    void P( real r )
        Q( cast(ulong) r );
    // B: -O doesn't fix this
    P( y );

Of course, getting rid of the BinOp.P call gets rid of the error as before.

Sorry if this is confusing. I've attached a file that might show this a little
more clearly. Picking line A or one line B by itself will not bring out the
error. It involves enabling A and one of the line Bs.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to