summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/rvalueref.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/rvalueref.d')
-rw-r--r--gcc/testsuite/gdc.test/compilable/rvalueref.d13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/rvalueref.d b/gcc/testsuite/gdc.test/compilable/rvalueref.d
new file mode 100644
index 00000000000..1c96c36f1f5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/rvalueref.d
@@ -0,0 +1,13 @@
+/* REQUIRED_ARGS: -preview=rvaluerefparam
+ */
+
+struct AS
+{
+ string get() @safe @nogc pure nothrow { return _s; }
+ alias get this;
+ @disable this(this);
+ string _s;
+}
+
+void popFront(ref string) { }
+static assert(!is(typeof((R r) => r.popFront)));