On 2013-04-02 16:17, Jacob Carlborg wrote:
Then I should probably report this as an issue.
http://d.puremagic.com/issues/show_bug.cgi?id=9859
--
/Jacob Carlborg
On 2013-04-02 15:03, Kenji Hara wrote:
I think this is not a hole of inout design. In this case, the lambda
inside foo should capture 'inout' context pointer.
void foo (inout int[] arr)
{
auto dg = {
foreach (i, e ; arr) {}
};
pragma(msg, typeof(dg)); // should print "v
On Thursday, 28 March 2013 at 14:16:27 UTC, Steven Schveighoffer
wrote:
On Thu, 28 Mar 2013 04:34:36 -0400, Jacob Carlborg
wrote:
The following code fails to compile:
void foo (inout int[] arr)
{
auto dg = {
foreach (i, e ; arr) {}
};
dg();
}
void main ()
{
auto a =
On Monday, 1 April 2013 at 20:37:34 UTC, Kagamin wrote:
On Friday, 29 March 2013 at 10:37:42 UTC, Maxim Fomin wrote:
You saw one particular example, the problem is much bigger.
What's problem? Try it.
???
What to try?
It seems there is misunderstanding. I point out that dmd
generates name
On Friday, 29 March 2013 at 10:37:42 UTC, Maxim Fomin wrote:
You saw one particular example, the problem is much bigger.
What's problem? Try it.
On Friday, 29 March 2013 at 09:03:11 UTC, Kagamin wrote:
On Thursday, 28 March 2013 at 16:34:47 UTC, Maxim Fomin wrote:
probably bypassing type system.
try to bypass the type system; we just saw the variables are
typechecked.
You saw one particular example, the problem is much bigger.
On Thursday, 28 March 2013 at 16:34:47 UTC, Maxim Fomin wrote:
probably bypassing type system.
try to bypass the type system; we just saw the variables are
typechecked.
On Thursday, 28 March 2013 at 14:16:27 UTC, Steven Schveighoffer
wrote:
I'm not sure what __aggr1174 is, but you can fix the e error by
specifying the type for e (or specifying it as const).
-Steve
This is a foolishness of dmd frontend. It generates names for
copies, temporaries, etc. These
On 2013-03-28 15:16, Steven Schveighoffer wrote:
Like Timon said, it's a bug in inout design.
I'm not sure what __aggr1174 is, but you can fix the e error by
specifying the type for e (or specifying it as const).
I'm assuming the issue is that the compiler is trying to generate a
struct to hol
well, closure is effectively a struct, so its fields should be
properly qualified, e.g. as const.
On Thu, 28 Mar 2013 04:34:36 -0400, Jacob Carlborg wrote:
The following code fails to compile:
void foo (inout int[] arr)
{
auto dg = {
foreach (i, e ; arr) {}
};
dg();
}
void main ()
{
auto a = [3, 4, 5];
foo(a);
}
Error message:
main.d(9): Error: variable
On 03/28/2013 09:34 AM, Jacob Carlborg wrote:
The following code fails to compile:
void foo (inout int[] arr)
{
auto dg = {
foreach (i, e ; arr) {}
};
dg();
}
void main ()
{
auto a = [3, 4, 5];
foo(a);
}
Error message:
main.d(9): Error: variable main.foo.__la
The following code fails to compile:
void foo (inout int[] arr)
{
auto dg = {
foreach (i, e ; arr) {}
};
dg();
}
void main ()
{
auto a = [3, 4, 5];
foo(a);
}
Error message:
main.d(9): Error: variable main.foo.__lambda1.__aggr1174 inout variables
can only be declare
13 matches
Mail list logo