From b0dfbbcbad9daf97db247ecdcbd4535b56a677ba Mon Sep 17 00:00:00 2001
From: Martin Nilsson <nilsson@opera.com>
Date: Sun, 4 Sep 2011 12:50:58 +0200
Subject: [PATCH] Testsuite: Added test for [bug 6062].

Thanks to Martin Nilsson <nilsson@opera.com> for the report and testcase.
---
 src/testsuite.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/testsuite.in b/src/testsuite.in
index 25c14915c9..aa20178bf9 100644
--- a/src/testsuite.in
+++ b/src/testsuite.in
@@ -440,6 +440,15 @@ test_eval_error([[
   X()->s = (mixed) X();
 ]])
 
+test_any([[
+  // Bug 6062
+  class C { mapping options = ([ 1:1 ]); };
+  C c = C();
+  c->options[3] = 3;
+  c = C();
+  return sizeof(c->options) == 1;
+]], 1)
+
 dnl bug in for loop optimization in combination with +=
 
 test_any([[
-- 
GitLab