From 8d813e26c1d7ebee3d64b45335bca22d0911d319 Mon Sep 17 00:00:00 2001
From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org>
Date: Sun, 23 Sep 2001 12:34:57 +0200
Subject: [PATCH] added bug [1858] to testsuite

Rev: src/testsuite.in:1.453
---
 src/testsuite.in | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/testsuite.in b/src/testsuite.in
index 6f506801f5..429570bb32 100644
--- a/src/testsuite.in
+++ b/src/testsuite.in
@@ -1,4 +1,4 @@
-test_true([["$Id: testsuite.in,v 1.452 2001/09/23 10:19:33 mirar Exp $"]]);
+test_true([["$Id: testsuite.in,v 1.453 2001/09/23 10:34:57 mirar Exp $"]]);
 
 cond([[all_constants()->_verify_internals]],
 [[
@@ -470,6 +470,26 @@ add_constant("test_c",compile_string(
 return res;
 	]],1);
 
+test_any( [[
+// bug [1858] ------------------------------------------------------------
+// http://community/crunch/show_bug.cgi?id=1858
+string s=#"
+   constant foo=({this_object()});
+   int|string test()
+   {
+      if (!foo[0]) return sprintf(\"foo is %O\\n\",foo)-\"\\n\";
+      if (foo[0]==this_object()) return 1;
+      return sprintf(\"foo is %O\\n\",foo)-\"\\n\";
+   }
+";
+class handler { void compile_error(string file, int line, string err) { }};
+catch {
+  program p=compile_string(s,"test",handler());
+  return p()->test();
+};
+return 1; // compile error is ok
+	]],1);
+
 // -----------------------------------------------------------------------
 
 
-- 
GitLab