[Issue 19301] New: [DIP1000] missing overload abilities
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 12 06:34:24 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19301
Issue ID: 19301
Summary: [DIP1000] missing overload abilities
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ilyayaroshenko at gmail.com
struct D
{
const(char)[] d;
this(scope const(char)[] d) @safe
{
this.d = "static_string";
}
this(string d) @safe
{
this.d = d;
}
}
D func(scope string s) @safe
{
return D(s);
}
---------
Error: scope variable s assigned to non-scope parameter d calling
mir.exception.D.this
Expected behavior: pass using `this(scope const(char)[] d)`
--
More information about the Digitalmars-d-bugs
mailing list