www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10076] New: expression.c:4310: virtual Expression* TypeExp::semantic(Scope*): Assertion `0' failed.

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

           Summary: expression.c:4310: virtual Expression*
                    TypeExp::semantic(Scope*): Assertion `0' failed.
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simendsjo gmail.com


--- Comment #0 from simendsjo <simendsjo gmail.com> 2013-05-13 13:54:46 PDT ---
Using dmd 2.062 on GNU/Linux Arch x64. Haven't tried other setups.

Running dustmite now, but it looks like it might take a while.

source/simendlib/validate.d(69): Error: template instance
getMembersAndAttributesWhere!(string, isValidationAttr)
getMembersAndAttributesWhere!(string, isValidationAttr) does not match template
declaration getMembersAndAttributesWhere(alias T, alias Pred)
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(73): Error: template instance
simendlib.validate.getValidaterAttrs!(string) error instantiating
source/simendlib/validate.d(31):        instantiated from here:
validate!(string)
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(73): Error: forward reference to
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements'
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(73): Error: forward reference to
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements'
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(69): Error: identifier 'Elements' of
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements' is not
defined
source/simendlib/validate.d(74): Error: forward reference to
'getMembersAndAttributesWhere!(string, isValidationAttr).Elements'
dmd: expression.c:4310: virtual Expression* TypeExp::semantic(Scope*):
Assertion `0' failed.
Error: Build command failed with exit code -6

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



--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-05-13 17:09:20 PDT ---
Where is the test case?

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



--- Comment #2 from simendsjo <simendsjo gmail.com> 2013-05-13 23:04:28 PDT ---
Here's a dustmine reduced testcase. Run with `dmd -unittest`.

unittest
{
string s;

validate(s);
}

template getValidaterAttrs(T)
{
alias getValidaterAttrs = getMembersAndAttributesWhere!().Elements;
}

string[] validate(T)(T )
{   alias memberAttrs = getValidaterAttrs!T;
if(!memberAttrs.length)
return ;

}

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



--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2013-05-13 23:27:46 PDT ---
 Here's a dustmine reduced testcase. Run with `dmd -unittest`.
Thanks. AFAICS This is a regreession from 2.060. This reduced code (Use old alias syntax): void main() { string s; validate(s); } template getValidaterAttrs(T) { alias getMembersAndAttributesWhere!().Elements getValidaterAttrs; } void validate(T)(T) { alias getValidaterAttrs!T memberAttrs; auto x = memberAttrs.length; } Fails without assertion in 2.059: test.d(8): Error: template instance getMembersAndAttributesWhere!() template 'getMembersAndAttributesWhere' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(12): Error: template instance test.getValidaterAttrs!(string) error instantiating test.d(4): instantiated from here: validate!(string) test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(12): Error: forward reference to 'getMembersAndAttributesWhere!().Elements' test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(12): Error: forward reference to 'getMembersAndAttributesWhere!().Elements' test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(13): Error: forward reference to 'getMembersAndAttributesWhere!().Elements' test.d(13): Error: getValidaterAttrs!(string) is used as a type test.d(4): Error: template instance test.validate!(string) error instantiating But cause an ice in 2.060: test.d(8): Error: template instance getMembersAndAttributesWhere!() template 'getMembersAndAttributesWhere' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(12): Error: template instance test.getValidaterAttrs!(string) error instantiating test.d(4): instantiated from here: validate!(string) test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(12): Error: forward reference to 'getMembersAndAttributesWhere!().Elements' test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(12): Error: forward reference to 'getMembersAndAttributesWhere!().Elements' test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(8): Error: identifier 'Elements' of 'getMembersAndAttributesWhere!().Elements' is not defined test.d(13): Error: forward reference to 'getMembersAndAttributesWhere!().Elements' Assertion failure: '0' on line 4216 in file 'expression.c' abnormal program termination -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 13 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10076


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull
           Platform|x86_64                      |All
           Severity|normal                      |regression


--- Comment #4 from Kenji Hara <k.hara.pg gmail.com> 2013-05-14 00:00:11 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2032

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



--- Comment #5 from github-bugzilla puremagic.com 2013-05-14 01:08:12 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1de97706107f9d4cc71553915ef29f6f426fbf41
fix Issue 10076 - expression.c:4310: virtual Expression*
TypeExp::semantic(Scope*): Assertion `0' failed.

https://github.com/D-Programming-Language/dmd/commit/61bcb35cc9a0dd6377b5c17e07a1ea6cb7fb2f12
Merge pull request #2032 from 9rnsr/fix10076

[REG2.060] fix Issue 10076 - expression.c:4310: virtual Expression*
TypeExp::semantic(Scope*): Assertion `0' failed.

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


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

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


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