Skip to content

Commit

Permalink
Change preprocessor duplicate error to warning (#2869)
Browse files Browse the repository at this point in the history
* Change preprocessor duplicate error to warning

* Fix differing types oversight
  • Loading branch information
Vurv78 authored Nov 23, 2023
1 parent 6f2c24f commit ec7e2d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/entities/gmod_wire_expression2/base/preprocessor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec7e2d2

Please sign in to comment.