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: nob...@puremagic.com
        ReportedBy: bugzi...@kyllingen.net


--- Comment #0 from Lars T. Kyllingstad <bugzi...@kyllingen.net> 2010-01-07 
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: -------

Reply via email to