From 1d6763f6b722a2393c9217f35575135de5e71b4c Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Mon, 30 Dec 2024 01:50:10 +0700 Subject: [PATCH] fix luals warning for vanilla lua mode --- .vscode/launch.json | 38 ++++++++++---------------------------- evolved.lua | 6 +++--- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 255d999..f559e2f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,40 +2,22 @@ "version": "0.2.0", "configurations": [ { - "name": "Launch Evolved All", + "name": "Launch Evolved All (lua5.1)", + "type": "lua-local", + "request": "launch", + "program": { + "lua": "lua5.1", + "file": "${workspaceFolder}/develop/all.lua" + } + }, + { + "name": "Launch Evolved All (luajit)", "type": "lua-local", "request": "launch", "program": { "lua": "luajit", "file": "${workspaceFolder}/develop/all.lua" } - }, - { - "name": "Launch Evolved Example", - "type": "lua-local", - "request": "launch", - "program": { - "lua": "luajit", - "file": "${workspaceFolder}/develop/example.lua" - } - }, - { - "name": "Launch Evolved Unbench", - "type": "lua-local", - "request": "launch", - "program": { - "lua": "luajit", - "file": "${workspaceFolder}/develop/unbench.lua" - } - }, - { - "name": "Launch Evolved Untests", - "type": "lua-local", - "request": "launch", - "program": { - "lua": "luajit", - "file": "${workspaceFolder}/develop/untests.lua" - } } ] } diff --git a/evolved.lua b/evolved.lua index c42576f..dc3e974 100644 --- a/evolved.lua +++ b/evolved.lua @@ -52,6 +52,7 @@ local __structural_changes = 0 ---@type integer --- --- +---@diagnostic disable-next-line: deprecated local __table_move = table.move or function(a1, f, e, t, a2) if a2 == nil then a2 = a1 @@ -72,9 +73,8 @@ local __table_move = table.move or function(a1, f, e, t, a2) return a2 end -local __table_unpack = table.unpack or function(list, i, j) - return unpack(list, i, j) -end +---@diagnostic disable-next-line: deprecated +local __table_unpack = table.unpack or unpack --- ---