Thread overview
[Issue 4225] New: mangle.c:81: char* mangle(Declaration*): Assertion `fd && fd->inferRetType' failed.
May 23, 2010
nfxjfg@gmail.com
May 24, 2010
Don
Jan 07, 2011
nfxjfg@gmail.com
Jan 07, 2011
Brad Roberts
Apr 11, 2011
Walter Bright
Feb 04, 2012
yebblies
May 23, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4225

           Summary: mangle.c:81: char* mangle(Declaration*): Assertion `fd
                    && fd->inferRetType' failed.
           Product: D
           Version: 1.057
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: nfxjfg@gmail.com


--- Comment #0 from nfxjfg@gmail.com 2010-05-23 07:37:44 PDT ---
$ cat bla.d
struct Foo {
    const x = Foo();

    static Foo opCall() {
        return Foo.init;
    }
}

$ dmd bla.d
::mangle(x)
dmd: mangle.c:81: char* mangle(Declaration*): Assertion `fd &&
fd->inferRetType' failed.
Aborted

Tested with dmd 1.061, where I removed the commented printf() in mangle.c line
37.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 24, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4225


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

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


--- Comment #1 from Don <clugdbug@yahoo.com.au> 2010-05-23 22:10:51 PDT ---
Probably related to bug 2080, since both involve type inference.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4225


nfxjfg@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4225


Brad Roberts <braddr@puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |braddr@puremagic.com
         Resolution|WONTFIX                     |


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 11, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4225


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-04-10 21:16:38 PDT ---
A partial fix:

https://github.com/D-Programming-Language/dmd/commit/1fc2fdb5fa9831eee2e1cae518ad350d517717c4

The error message is now:

test.d(2): Error: cannot implicitly convert expression (opCall()) of type Foo
to Foo

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 04, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4225


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice                         |rejects-valid
                 CC|                            |yebblies@gmail.com
           Platform|Other                       |All
            Version|1.057                       |D2


--- Comment #3 from yebblies <yebblies@gmail.com> 2012-02-04 18:59:17 EST ---
Compiles without error on D1 (1.072)

Give a forward reference error with D2 (2.058)

struct Foo {
    enum x = Foo();

    static Foo opCall() {
        return Foo.init;
    }
}

testx.d(5): Error: forward reference to type Foo
testx.d(5): Error: cannot implicitly convert expression (Foo()) of type Foo to
Foo

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