summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test19936.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/test19936.d')
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19936.d17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/test19936.d b/gcc/testsuite/gdc.test/compilable/test19936.d
new file mode 100644
index 00000000000..248e28a7060
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19936.d
@@ -0,0 +1,17 @@
+// REQUIRED_ARGS: -de
+
+struct Bla
+{
+ deprecated("bla")
+ int get() { return 5; }
+
+ alias get this;
+}
+
+void main()
+{
+ Bla[] blaArray;
+ // ~= should not try to call `.get`, because there's no indication that
+ // `blaArray` has any kind of opAppendAssign related overload in the first place.
+ blaArray ~= Bla();
+}