digitalmars.D.bugs - mixin identifier and operator syntax
- Bent Rasmussen (16/16) Jul 17 2004 This crashes on DMD 0.95 XP SP1. The issue is the use of [] syntax to in...
- Walter (5/21) Jul 20 2004 It shouldn't be allowed, since operator overloading is for structs and
This crashes on DMD 0.95 XP SP1. The issue is the use of [] syntax to invoke opIndex. module test; template Test() { bit opIndex(bit x) { return !x; } } void main() { mixin Test!() xs; bit x = xs[false]; } I'm not sure if it is allowed, but I don't see why not.
Jul 17 2004
It shouldn't be allowed, since operator overloading is for structs and classes. "Bent Rasmussen" <exo bent-rasmussen.info> wrote in message news:cdcrm9$1u85$1 digitaldaemon.com...This crashes on DMD 0.95 XP SP1. The issue is the use of [] syntax toinvokeopIndex. module test; template Test() { bit opIndex(bit x) { return !x; } } void main() { mixin Test!() xs; bit x = xs[false]; } I'm not sure if it is allowed, but I don't see why not.
Jul 20 2004