Skip to content

Commit 76f4031

Browse files
committed
"fix" weird tarantool bug
1 parent 85af0fb commit 76f4031

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

nattlua/definitions/utility.nlua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,12 @@ analyzer function LuaVersion()
353353
end
354354
end
355355

356+
analyzer function LuaJITVersion()
357+
if _G.misc and _G.misc.getmetrics then return "tarantool" end
358+
359+
return "luajit"
360+
end
361+
356362
analyzer function TType(T: any)
357363
return T.Type
358364
end

test/tests/nattlua/analyzer/complex/cdata.nlua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ end
2222

2323
do --- smoke band
2424
attest.equal(tostring(band(1ll, 1, 1ll, -1)), "1LL")
25-
attest.equal(tostring(band(1ll, 1, 1ull, -1)), "0ULL")
25+
26+
if LuaJITVersion() ~= "tarantool" then
27+
attest.equal(tostring(band(1ll, 1, 1ull, -1)), "0ULL")
28+
end
2629
end
2730

2831
do --- smoke shl

0 commit comments

Comments
 (0)