We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 030ee45 commit e4452f7Copy full SHA for e4452f7
1 file changed
test/tests/nattlua/analyzer/analyzer.lua
@@ -689,3 +689,20 @@ end
689
690
attest.equal(test()[2], 2)
691
]]
692
+analyze[[
693
+local x = setmetatable({}, {
694
+ __unm = function(self: any)
695
+ return 42
696
+ end,
697
+ __bxor = function(self: any)
698
+ return 43
699
700
+ __len = function(self: any)
701
+ return 44
702
703
+})
704
+
705
+attest.equal(-x, 42)
706
+attest.equal(~x, 43)
707
+attest.equal(#x, 44)
708
+]]
0 commit comments