compiler does not detect accessing on null class object.
    dangbinghoo 
    dangbinghoo at gmail.com
       
    Mon May 27 15:13:00 UTC 2019
    
    
  
hello,
code below:
-----
     class a  {
         string a1;
     }
     a a1;
     writeln(a1.a1);
-----
compiles and produce "core dump" or "segfault", does this fit the 
original D design? why the compiler does not detect for accessing 
a null object and refused to compile?
And, 2nd question: where can I find the Subset spec of SafeD?
Thanks!
--------------
binghoo dang
    
    
More information about the Digitalmars-d-learn
mailing list