Issue with dmd 2.066, alias this, and sort
    rcor via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Wed Aug 27 14:15:45 PDT 2014
    
    
  
I've tried to express my problem in a mostly minimal example here:
https://gist.github.com/murphyslaw480/d4a5f857a104bcf62de1
The class Point has an alias this to its own property 
'feature()', which returns a reference to a private member. When 
I try to sort a Point[], DMD fails with "mutable method feature 
is not callable on const object". I'm not actually using the 
property 'feature()' or the alias this in the sorting, so it 
seems like it shouldn't interfere. That being said, I'm still 
slightly const-challenged so maybe its an error on my part. 
However, the above example compiles fine with DMD 2.065.0-3.
    
    
More information about the Digitalmars-d-learn
mailing list