www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10244] New: ICE: expression.c:8186: virtual Expression* CallExp::semantic(Scope*): Assertion `td' failed

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

           Summary: ICE: expression.c:8186: virtual Expression*
                    CallExp::semantic(Scope*): Assertion `td' failed
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: yazan.dabain gmail.com


--- Comment #0 from yazan.dabain gmail.com 2013-06-02 10:59:21 PDT ---
Test case shouldn't compile however the compiler errors. Minimized using
dustmite:

struct Foo {
  string _str;
  long _integer;

  template DeclareConstructor(string propertyName) {
    enum code = `this(typeof(_` ~ propertyName ~ `) value) {
      ` ~ propertyName ~ ` = value;
      }`;
    mixin(code);
  }

  mixin DeclareConstructor!"str";
  mixin DeclareConstructor!"integer";
}

void main() {
  auto value = Foo;
  value.object = Foo("D");
}


Replacing enum from code variable with auto stops the ICE.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 02 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10244



--- Comment #1 from yazan.dabain gmail.com 2013-06-23 13:30:31 PDT ---
Edit: changed assertion line to 8364 based on git HEAD commit 58d3869.

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


Benjamin Thaut <code benjamin-thaut.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc


--- Comment #2 from Benjamin Thaut <code benjamin-thaut.de> 2013-06-26 22:09:53
PDT ---
*** Issue 10450 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: -------
Jun 26 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10244



--- Comment #3 from bearophile_hugs eml.cc 2013-06-27 04:28:19 PDT ---
(In reply to comment #2)
 *** Issue 10450 has been marked as a duplicate of this issue. ***
This issue gives: Assertion failure: 'td' on line 8375 in file 'expression.c' Issue 10450 gives: Internal error: backend\cgcv.c 2162 It's totally different code, a different source file, so I think you are wrong. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10244


Benjamin Thaut <code benjamin-thaut.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code benjamin-thaut.de


--- Comment #4 from Benjamin Thaut <code benjamin-thaut.de> 2013-06-27 09:24:09
PDT ---
Damnit, typo: I meant issue 10224

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

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull


--- Comment #5 from Kenji Hara <k.hara.pg gmail.com> 2013-06-27 22:33:17 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2265

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



--- Comment #6 from github-bugzilla puremagic.com 2013-06-27 22:55:35 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/2f2f39c45825f2c13cfc9a249531823fb9e64539
fix Issue 10244 - ICE: expression.c:8364: virtual Expression*
CallExp::semantic(Scope*): Assertion `td' failed

https://github.com/D-Programming-Language/dmd/commit/2abca6803db3e05d2a35c36abc61c18ad328c7e4
Merge pull request #2265 from 9rnsr/fix10244

Issue 10244 - ICE: expression.c:8364: virtual Expression*
CallExp::semantic(Scope*): Assertion `td' failed

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


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


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



--- Comment #7 from yazan.dabain gmail.com 2013-06-28 00:14:40 PDT ---
Thanks Kenji!

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