http://d.puremagic.com/issues/show_bug.cgi?id=7947

           Summary: typeof on anonymous function literal returns void
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: ja...@aatch.net


--- Comment #0 from James Miller <ja...@aatch.net> 2012-04-20 02:19:04 PDT ---
The following code:

  pragma(msg, typeof(x => x));

prints out void. Semi understandable, if unintuitive.

this also does

  test(alias fn, T)(T t)
  if(is(typeof(fn(t))))
  {
    pragma(msg, typeof(fn));
  }
  test!(x => x < 5)(10);

Which is more annoying. There should either be an error in this case

Also happens with expanded function(...){...} syntax, as long as the parameter
types are not specified.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to