www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14441] New: Strange error with string ctor

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

          Issue ID: 14441
           Summary: Strange error with string ctor
           Product: D
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: temtaime gmail.com

auto s = string(`foo`);

Error: function expected before (), not string of type string

It should be accepted because all built-in types has a ctor.

For example auto a = int(10); works

--
Apr 12 2015