do check of bad overloading

This commit is contained in:
sonoro1234
2018-10-21 11:39:23 +02:00
parent 3da4350671
commit f6fdec9d98
2 changed files with 34 additions and 24 deletions

View File

@@ -10,7 +10,7 @@
:: impl_definitions.lua for implementation function definitions
:: set your PATH if necessary for LuaJIT or Lua5.1 or luajit with: (for example)
set PATH=%PATH%;C:\luaGL;C:\mingw32\bin;
:: set PATH=%PATH%;C:\luaGL;C:\mingw32\bin;
:: set PATH=%PATH%;C:\luaGL;C:\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\mingw32\bin;
:: set PATH=%PATH%;C:\luaGL\sources\luajit-master\luajit-master\bin\mingw32;C:\mingw32\bin;
::process files

View File

@@ -779,6 +779,16 @@ local function func_parser()
table.insert(strt,string.format("%d\t%s\t%s %s",i,t.ret,t.ov_cimguiname,t.signature))
--prtable(typesc[i])
end
--check not two names are equal (produced by bad cimguiname_overload)
for i=1,#v-1 do
for j=i+1,#v-1 do
if v[i].ov_cimguiname == v[j].ov_cimguiname then
local t,tj = v[i],v[j]
print("Error caused by Bad overloading "..t.ov_cimguiname.." of function ",t.funcname,t.signature,"conflicts with ",tj.funcname,tj.signature)
error("Bad overloading:"..t.ov_cimguiname)
end
end
end
end
end
--print(numoverloaded, "overloaded")