opImplConv() with different return types crashes application in ternary operator assignment
gamedev.net
In making a class, opImplConv is defined twice with different returns types, i.e.:class Thing { int opImplConv() { return 0; } float opImplConv() { return 0; }}I make a ternary operator return either one of these or null:void Main() { auto foo = true ? Thing() : null;}This will cause the following crash:
0 Kommentare ·0 Anteile ·77 Ansichten