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

--- Comment #0 from Lars T. Kyllingstad <> 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:
------- You are receiving this mail because: -------

Reply via email to