[Issue 6317] New: A inner struct with member function causes a compiler internal error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 14 07:24:09 PDT 2011


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

           Summary: A inner struct with member function causes a compiler
                    internal error
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bitworld at qq.com


--- Comment #0 from Heromyth <bitworld at qq.com> 2011-07-14 07:18:58 PDT ---
If "struct Relative" is defined at the outer of doTest(), everything is OK.

Here are the test codes:
=====================================
import std.stdio;

void doTest()
{
    struct Relative
    {
        int xBase;
        int xDir;

        // This method causes a compiler internal error
        void MoveTo()
        {
        }
    }

    Relative rel = {1, 2};
}

int main(string[] args)
{
    return 0;
}
=====================================

-- 
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