From fc8d077612a235b42d5defd48d6ba923ed85a17f Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 29 May 2007 15:59:59 -0300
Subject: bug: wrong error message in some concatenations

---
 bugs | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

(limited to 'bugs')

diff --git a/bugs b/bugs
index 2025aa63..45345a85 100644
--- a/bugs
+++ b/bugs
@@ -1417,7 +1417,7 @@ lcode.c:
 
 Bug{
 what = [[Count hook may be called without being set.]],
-report = [[Mike Pall, on May 2007]],
+report = [[Mike Pall, on 05/2007]],
 since = [[?]],
 example = [[ ]],
 patch = [[
@@ -1448,6 +1448,27 @@ not in 'lua_State'.)
 ]],
 }
 
+Bug{
+what = [[wrong error message in some concatenations]],
+report = [[Alex Davies, on 05/2007]],
+since = [[5.1.2]],
+example = [[a = nil; a = (1)..a]],
+patch = [[
+ldebug.c:
+@@ -563,8 +563,8 @@
+
+
+ void luaG_concaterror (lua_State *L, StkId p1, StkId p2) {
+-  if (ttisstring(p1)) p1 = p2;
+-  lua_assert(!ttisstring(p1));
++  if (ttisstring(p1) || ttisnumber(p1)) p1 = p2;
++  lua_assert(!ttisstring(p1) && !ttisnumber(p1));
+   luaG_typeerror(L, p1, "concatenate");
+ }
+
+]],
+}
+
 Bug{
 what = [[ ]],
 report = [[ , on ]],
-- 
cgit v1.2.3-55-g6feb