www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7645] New: Internal error: e2ir.c 688

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

           Summary: Internal error: e2ir.c 688
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: mrmocool gmx.de



class Query(string queryText)
{
    class Entity
    {
        void[] buf;

        class fld(T,string varName)
        {
            T opCall()
            {
                return cast(T)buf;
            }
        }
    }
    Entity e;
}
void main()
{
    scope query = new Query!"SELECT ONLY_NEEDED_COLUMNS"
        "FROM contacts c"
        "WHERE c.country = 'US'"
        "AND   c.sales > 10000;";

    auto entity = query.e;
    //foreach(entity; query)
    //{
        auto email_addy = entity.fld!(char,"email")();
}

$ dmd test.d 
entity.(fld)
Internal error: e2ir.c 688

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 04 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7645


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



11:18:57 PST ---
Slightly more reduced:

class Query(string queryText)
{
    class Entity
    {
        void[] buf;

        class fld(T, string varName)
        {
            T opCall()
            {
                return cast(T)buf;
            }
        }
    }
    Entity e;
}

void main()
{
    scope query = new Query!"SELECT ONLY_NEEDED_COLUMNS";
    auto entity = query.e;
    auto email_addy = entity.fld!(char, "email")();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 04 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7645




And more:

class Entity
{
  class fld()
  {
    char t;
  }
}

void main()
{
    Entity entity;
    auto email_addy = entity.fld!().t;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 04 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7645


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michal.minich gmail.com



14:17:49 MSD ---
*** Issue 7701 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 14 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7645


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg gmail.com



14:18:06 MSD ---
It can be templated `class`, `struct`, or `union`, with function or field.

Testcase from Issue 7701:
---
struct S {
    struct S2 (T) {
        void fn () {}
    }
}

void main () {
    S s;
    s.S2!int.fn();
}
---

Also now internal error is: e2ir.c 780

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