Actually, after the recent introduction of opIndexAssign, this will have to
be:
class A
{
float opIndex(float k) {
return k;
}
float opIndexAssign(float v, float k) {
return k;
}
}
(Not sure about the final resolution about the ordering of the arguments.)