Change preprocessor duplicate error to warning (#2869)

* Change preprocessor duplicate error to warning

* Fix differing types oversight
This commit is contained in:
Vurv 2023-11-22 17:17:15 -08:00 committed by GitHub
parent 6f2c24f50d
commit ec7e2d266e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,11 @@ local function handleIO(name)
for i, key in ipairs(retval[1]) do
if ports[3][key] then
self:Error("Directive (@" .. name .. ") contains multiple definitions of the same variable", columns[i])
if ports[3][key] ~= retval[2][i] then
self:Error("Directive (@" .. name .. ") contains multiple definitions of the same variable with differing types", columns[i])
else
self:Warning("Directive (@" .. name .. ") contains multiple definitions of the same variable", columns[i])
end
else
local index = #ports[1] + 1
ports[1][index] = key -- Index: Name