digitalmars.D.bugs - [Issue 3684] New: Segmentation fault on wrong template instantiation syntax with typeof
- d-bugmail puremagic.com (31/31) Jan 07 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3684
- d-bugmail puremagic.com (11/11) Apr 09 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3684
http://d.puremagic.com/issues/show_bug.cgi?id=3684
Summary: Segmentation fault on wrong template instantiation
syntax with typeof
Product: D
Version: 2.038
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: bugzilla kyllingen.net
03:17:05 PST ---
The following (incorrect) code causes DMD to segfault on compilation:
template Foo(T) if (is(T == int))
{
enum bool Foo = true;
}
template Foo(T) if (!is(T == int))
{
enum bool Foo = Foo(typeof(int.min));
}
static assert (Foo!double);
In the second template, note the following two things which are BOTH required
to reproduce the bug:
1) The ! is missing from the template instantiation.
2) The template parameter is typeof(int.min) instead of just int.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 07 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3684
Don <clugdbug yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Fixed DMD2.043.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 09 2010








d-bugmail puremagic.com