http://d.puremagic.com/issues/show_bug.cgi?id=8847



--- Comment #1 from monarchdo...@gmail.com 2012-10-18 02:19:29 PDT ---
(In reply to comment #0)
> Which is very strange. I found the root condition that recreates this: It is
> having a voldemort function that is qualified with inout:
> 
> //----
> import std.stdio;
> import std.conv;
> 
> auto S()
> {
>     static struct Result
>     {
>       inout(Result) get() inout {return this;}
>     }
>     return Result();
> }
> 
> void main()
> {
>     auto a = S();
>     auto b = a.get();
>     alias typeof(a) A;
>     alias typeof(b) B;
>     writeln("Typeof A: ", A.stringof);
>     writeln("Typeof B: ", B.stringof);
>     assert(is(A == B), text(A.stringof, " is different from " , B.stringof));
> }
> //----
> Typeof A: Result
> Typeof B: Result
> core.exception.AssertError@main.d(21): Result is different from Result
> //----

Yeah, I forgot to mention, if you remove the "inout" attribute, or if you make
Result a global struct, the problem disappears, so it *really* only ever
appears when inout and voldemort are combined.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to