summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test20661.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/test20661.d')
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20661.d17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/test20661.d b/gcc/testsuite/gdc.test/compilable/test20661.d
new file mode 100644
index 00000000000..c755fa851ac
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20661.d
@@ -0,0 +1,17 @@
+// https://issues.dlang.org/show_bug.cgi?id=20661
+
+class Context
+{
+ size_t[const(Key)] aa; /* Error: AA key type Key does not have bool opEquals(ref const Key) const */
+ bool* checkAll;
+}
+
+struct Key
+{
+ Context context;
+ bool opEquals(ref const Key other) @safe const
+ {
+ auto c = context.checkAll;
+ return true;
+ }
+}