https://issues.dlang.org/show_bug.cgi?id=21787
Manfred Nowak <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement --- Comment #1 from Manfred Nowak <[email protected]> --- Specs.20.8|1 require `opIndex` to be a method. Therefore this is not a bug, but an enhancement. Although that requirement can be satisfied by declaring class C{ bool delegate( int) opIndexVar; bool opIndex( int arg){ return opIndexVar( arg); } } the result would be an additional call unless the machine code generator optimizes that call away. --
