diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/test20136.d')
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/test20136.d | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/test20136.d b/gcc/testsuite/gdc.test/compilable/test20136.d new file mode 100644 index 00000000000..a5fb8e3d504 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test20136.d @@ -0,0 +1,18 @@ +// https://issues.dlang.org/show_bug.cgi?id=20136 +class Context +{ + size_t[const(Key)] aa; + bool checkAll; +} + +struct Key +{ + Context context; + int i; + bool opEquals(ref const Key other) const + { + if(context.checkAll && i != other.i) + return false; + return true; + } +} |