[Issue 7817] opAssign to in declaration broken in dmd 1.074 beta1

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 3 12:07:37 PDT 2012


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2012-04-03 12:08:11 PDT ---
(In reply to comment #0)
> The following code works in dmd.1.073 but is broken in dmd.1.074.
> 
> struct Foo {}
> 
> struct Bar {
>     void opAssign(Foo f) {}
> }
> 
> void test() {
>     Foo f;
>     Bar bar = f; // Broken in dmd 1.074-bet

That isn't an assignment - it's an initialization.
I wonder why that worked before.

> 
>     Bar baz;
>     baz = f; // Works as expected.
> }

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


More information about the Digitalmars-d-bugs mailing list