Bug 14441 – Strange error with string ctor

Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-12T12:37:35Z
Last change time
2020-03-21T03:56:40Z
Assigned to
No Owner
Creator
Temtaime

Comments

Comment #0 by temtaime — 2015-04-12T12:37:35Z
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
Comment #1 by b2.temp — 2019-03-20T22:35:52Z
string is not a builtin type, it's an alias to an array, so the rule for uniform constructor call doesn't apply.