www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11505] New: Bad error message: "opAssign [...] is annotated with disable"

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11505

           Summary: Bad error message: "opAssign [...] is annotated with
                     disable"
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic, rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bugzilla kyllingen.net


--- Comment #0 from Lars T. Kyllingstad <bugzilla kyllingen.net> 2013-11-12
11:10:07 PST ---
Reduced test case:

    struct Foo
    {
        Bar b;
        unittest
        {
            Foo f;
            f = Foo();
        }
    }

    struct Bar
    {
        ~this()  safe { }
        struct Inner { }
        Inner* i;
    }

As far as I can tell, the above is valid code, but when I run "dmd -c -unittest
test.d", DMD spits out:

test.d(7): Error: function test.Foo.opAssign is not callable because it is
annotated with  disable

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 12 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11505


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-11-17 18:34:09 PST ---
https://github.com/D-Programming-Language/dmd/pull/2804

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11505



--- Comment #2 from github-bugzilla puremagic.com 2013-11-30 10:54:11 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a113001ef631df28109d444edc493cd4ac5842b8
fix Issue 11505 - Bad error message: "opAssign [...] is annotated with
 disable"

https://github.com/D-Programming-Language/dmd/commit/58562d274cd81e581eef260d1be6bdea8ceeba15
Merge pull request #2804 from 9rnsr/fix11505

[REG2.064] Issue 11505 - Bad error message: "opAssign [...] is annotated with
 disable"

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 30 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11505


Martin Nowak <code dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |code dawg.eu
         Resolution|                            |FIXED


--- Comment #3 from Martin Nowak <code dawg.eu> 2013-11-30 10:55:22 PST ---
 If struct field has  safe ~this(), enclosing struct should try to generate
 trusted opAssign to use void initializer.
https://github.com/D-Programming-Language/dmd/pull/2804#issuecomment-29147573 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 30 2013