www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Immutable variadic lambda

reply "bearophile" <bearophileHUGS lycos.com> writes:
This program causes me a crash, do you know if it's a problem of 
mine, a known bug, or an unknown one?


void main() {
     static foo = (int[] x...) => 0;
     foo();
}


A similar problem:

import std.typecons: Tuple;
void main() {
     alias Foo = Tuple!(int);
     static bar = (Foo x) => 0;
     bar(Foo());
}

Bye,
bearophile
Oct 12 2013
parent "bearophile" <bearophileHUGS lycos.com> writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11264

Bye,
bearophile
Oct 14 2013