Thread overview
[Issue 5433] New: Cannot use auto functions at compile-time
Jan 08, 2011
Andrej Mitrovic
Jan 08, 2011
Stewart Gordon
Jan 12, 2011
Stewart Gordon
May 21, 2011
Andrej Mitrovic
January 08, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5433

           Summary: Cannot use auto functions at compile-time
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: andrej.mitrovich@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-01-08 09:46:01 PST ---
enum var1 = foo();  // Fine
enum var2 = bar();  // Error: forward reference to bar

int foo()
{
    return 1;
}

auto bar()
{
    return 1;
}

void main()
{
}

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


Stewart Gordon <smjg@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
                 CC|                            |smjg@iname.com


--- Comment #1 from Stewart Gordon <smjg@iname.com> 2011-01-08 10:21:47 PST ---
The same error occurs if the declaration of var2 is moved to the end (and therefore not actually a forward reference).

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


Stewart Gordon <smjg@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |2810


--- Comment #2 from Stewart Gordon <smjg@iname.com> 2011-01-12 02:46:41 PST ---
Issue 2810 seems to be the root cause of this.

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


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

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


--- Comment #3 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-05-20 18:42:48 PDT ---
Confirmed, issues is fixed.

*** This issue has been marked as a duplicate of issue 2810 ***

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