www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18916] New: ICE using Typedef and __LINE__


          Issue ID: 18916
           Summary: ICE using Typedef and __LINE__
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: trikkuz gmail.com

This code:

import std.typecons: Typedef;
alias Line = Typedef!int;

void foo(Line line = __LINE__) { }

void main(){ foo(); }

Illegal instruction (core dumped)

On LDC2:
Error: Internal compiler error: Type Expression not implemented: __LINE__

May 30 2018