https://issues.dlang.org/show_bug.cgi?id=23620
--- Comment #7 from Max Samukha <[email protected]> --- (In reply to Salih Dincer from comment #6) > // because : > > enum index1 = Index(); > assert( > is(typeof(index1) == struct) > ); > > auto index2 = Index(); > assert( > !is(typeof(index1) == size_t) && > !is(typeof(index2) == size_t) > ); > > // but: > > enum index = Index(); > int[index + 1] d; // automatic conversion > d[0] = 42; // yeah > > SDB@79 I still don't understand. Static array declaration expects an integer. 'Index' implicitly converts to an integer. Why should casts or other hacks be required? --
