"in" operator & const

funog funog at ifrance.com
Thu Feb 14 23:06:07 PST 2008


Not sure if it's a bug or not : (DMD 2.010)

class Food{}
const(int[Food]) caa;
const(Food) x = new Food;
x in caa;

Error: cannot implicitly convert expression (x) of type const(Food) to test.Food

Shouldn't x be a const parameter, as it's not going to be modified by the in operator as far as I know ?



More information about the Digitalmars-d mailing list