digitalmars.D.bugs - [Issue 1146] New: mixin + assert() crashes compiler
- d-bugmail puremagic.com (25/25) Apr 14 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1146
- d-bugmail puremagic.com (13/13) Apr 23 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1146
- d-bugmail puremagic.com (9/9) Apr 27 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1146
http://d.puremagic.com/issues/show_bug.cgi?id=1146
Summary: mixin + assert() crashes compiler
Product: D
Version: 1.011
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P3
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: dheld codelogicconsulting.com
The code below results in the compiler attempting to dereference a null
pointer. I don't know if the code should be legal or not, but I'm pretty sure
the compiler shouldn't crash either way.
emplate MetaString(String)
{
alias String Value;
}
void main()
{
alias MetaString!("2 == 1") S;
assert(mixin(S.Value));
}
--
Apr 14 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1146
thomas-dloop kuehne.cn changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Windows |All
"template MetaString(String)" expects String to be a type, "2 == 1" isn't a
type thus the code is illegal.
Added to DStress as
http://dstress.kuehne.cn/nocompile/m/mixin_33_A.d
http://dstress.kuehne.cn/nocompile/m/mixin_33_B.d
http://dstress.kuehne.cn/nocompile/m/mixin_33_C.d
--
Apr 23 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1146
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Fixed DMD 1.014
--
Apr 27 2007









d-bugmail puremagic.com 