mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
17 lines
289 B
D
17 lines
289 B
D
// https://issues.dlang.org/show_bug.cgi?id=16047
|
|
module test16047;
|
|
|
|
void main()
|
|
{
|
|
Reassignable[int][int] aa;
|
|
|
|
aa[0][0] = Reassignable.init;
|
|
aa[s()][0] = Reassignable.init; // range violation
|
|
}
|
|
|
|
struct Reassignable
|
|
{
|
|
void opAssign(Reassignable) {}
|
|
}
|
|
|
|
int s() { return 1; }
|