luau
luau copied to clipboard
Type function instance union<*blocked-1904148*, *blocked-1904144*> is uninhabited This is likely to be a bug, please report it at https://github.com/luau-lang/luau/issues
function module.Debug(code:string, step:number, excluded:{string}?)
code = module.RemoveComments(code)
local i= 1
if (step > i) then code = module.ReplaceAnnotations(code) i+=1 end
if (step > i) then code = module.RemoveDocumentations(code) i+=1 end
if (step > i) then code = module.PropertyToIndex(code,excluded) i+=1 end
if (step > i) then code = module.RenameLocalVariables(code,excluded) i+=1 end
if (step > i) then code = module.RenameFunctions(code,excluded) i+=1 end
if (step > i) then code = module.RenameFunctionsParameters(code,excluded) i+=1 end
if (step > i) then code = module.RenameTableIndexes(code,excluded) i+=1 end
if (step > i) then code = module.RenameLoopExpressions(code) i+=1 end
if (step > i) then code = module.BytifyStrings(code) i+=1 end
if (step > i) then code = module.CompressCode(code) i+=1 end
return code
end
issue is gone when i change one if statement if (step > i) then code = module.ReplaceAnnotations(code)::string i+=1 end --added ::string
this module is presious it envolves in string manupilation to achieve what i call basic lua code obfucation.
so issues like this are common and everytime i have to remind the typechecker to see the variable as ::string
happens often with string:gsub or if statements...
--im using the new typechecker.