www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Why this code fail?

reply "Andrea Fontana" <nospam example.com> writes:
class A
{
         auto foo()
         out(result){}
         body { return 42; }
}

void main(string[] args) { }

if you replace "auto" with "int" it works...
Feb 12 2013
next sibling parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 02/12/2013 04:01 PM, Andrea Fontana wrote:
 class A
 {
 auto foo()
 out(result){}
 body { return 42; }
 }

 void main(string[] args) { }

 if you replace "auto" with "int" it works...

Compiler bug: $ dmd deneme.d Segmentation fault Please report it at http://d.puremagic.com/issues/ Thank you, Ali
Feb 12 2013
prev sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
Ali Çehreli:

 Please report it at

   http://d.puremagic.com/issues/

See: http://d.puremagic.com/issues/show_bug.cgi?id=8860 Bye, bearophile
Feb 12 2013