dmd/compiler/test/compilable/issue21882.d
2022-07-09 18:53:07 +02:00

14 lines
304 B
D

// REQUIRED_ARGS: -preview=dip1021
// https://issues.dlang.org/show_bug.cgi?id=21882
bool buildPath()
{
struct ByCodeUnitImpl
{
auto opIndex(size_t) { }
}
return isRandomAccessRange!ByCodeUnitImpl;
}
enum isRandomAccessRange(R) = is(typeof(lvalueOf!R[1]));
ref T lvalueOf(T)();