From 1143dcfee6261c1a14783919c1bd4a17801a8fe2 Mon Sep 17 00:00:00 2001 From: AlexALX Date: Tue, 16 Jun 2026 20:46:31 +0300 Subject: [PATCH] backward compatibility with string calls and empty e2, fix issue mention in #2841 --- lua/entities/gmod_wire_expression2/base/compiler.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/base/compiler.lua b/lua/entities/gmod_wire_expression2/base/compiler.lua index 8b4c8f9afa..b1757b5391 100644 --- a/lua/entities/gmod_wire_expression2/base/compiler.lua +++ b/lua/entities/gmod_wire_expression2/base/compiler.lua @@ -1792,7 +1792,7 @@ local CompileVisitors = { local fn = state.funcs[sig] or state.funcs[meta_sig] if fn then -- first check if user defined any functions that match signature local r = state.funcs_ret[sig] or state.funcs_ret[meta_sig] - if r ~= ret_type then + if r ~= ret_type and not (ret_type == nil or r == "") then state:forceThrow( "Mismatching return types. Got " .. (r or "void") .. ", expected " .. (ret_type or "void")) end @@ -1801,7 +1801,7 @@ local CompileVisitors = { fn = wire_expression2_funcs[sig] or wire_expression2_funcs[meta_sig] if fn then local r = fn[2] - if r ~= ret_type and not (ret_type == nil and r == "") then + if r ~= ret_type and not (ret_type == nil or r == "") then state:forceThrow( "Mismatching return types. Got " .. (r or "void") .. ", expected " .. (ret_type or "void")) end