www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17076] New: [scope] compiling identity function template with

https://issues.dlang.org/show_bug.cgi?id=17076

          Issue ID: 17076
           Summary: [scope] compiling identity function template with
                    -dip1000 causes error
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Keywords: safe
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: r.sagitario gmx.de

With dmd-2.073-beta1, compiling this:

  int identity(T)(T a) { return a; }
  int ii = identity(3);

with "dmd -dip1000 test.d" yields

test.d(1): Error: parameter a is 'return' but function does not return any
indirections

--
Jan 08