[Issue 11743] New: cannot initialize const arrays with out parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 14 11:08:47 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11743
Summary: cannot initialize const arrays with out parameters
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bugzilla at digitalmars.com
--- Comment #0 from Walter Bright <bugzilla at digitalmars.com> 2013-12-14 11:08:45 PST ---
The following shows the problem:
---------------------
struct S {
const int[] x;
const int[] y;
const int z;
this(int i) {
x = null; // works
foo(y); // fails
bar(z); // works
}
}
void foo(out int[] y) { y = null; }
void bar(out int z) { z = 1; }
---------------------
dmd -c foo
foo.d(9): Error: function foo.foo (out int[] y) is not callable using argument
types (const(int[]))
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list