Rosettacode: program termination

Andrea Fontana nospam at example.com
Tue Apr 15 03:00:52 PDT 2014


On Tuesday, 15 April 2014 at 09:48:57 UTC, bearophile wrote:
> Andrea Fontana:
>
>> http://dpaste.dzfl.pl/33cb0a05f0ff
>>
>> Static destructor is called!
>>
>> Application output:
>> spam at exit
>> bar at exit
>> foo at exit
>> Never called
>
> Well, we have a little mystery here :-) Using both the latest 
> beta of ldc2 and the latest alpha of dmd, on Windows32 I don't 
> see "Never called" called :-) Perhaps this incongruence is 
> another little compiler bug? :-)
>
> Bye,
> bearophile

I think so. On dpaste using 2.063.2 or git version that function 
isn't called. Only on 2.065..

More:
import std.stdio;
"Never called".writeln;

This doens't work on git version (only in 2.065). I think it is a 
known behaviour about "local" import + ufcs. Why does it work on 
2.065?






More information about the Digitalmars-d-learn mailing list