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
Comment #1 by k.hara.pg — 2013-05-13T17:09:20Z
Where is the test case?
Comment #2 by simendsjo — 2013-05-13T23:04:28Z
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 ;
}
Comment #3 by k.hara.pg — 2013-05-13T23:27:46Z
> 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