www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17836] New: ICE with custom 'map' template


          Issue ID: 17836
           Summary: ICE with custom 'map' template
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: elronnd protonmail.ch

This code causes an ICE in dmd and gdc.  Under LDC it compiles without errors
and when run it does exactly as expected:

void main() {
        import std.stdio;

        template mmap(alias fun) {
                void mmap(T...)(T list) {
                        foreach (item; list) {                                  

        void printstuffs(T...)(T args) {
                void printer(G)(G arg) {


        printstuffs("bla", 7, 9.0);

Sep 17 2017