We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08b9dd3 commit a525372Copy full SHA for a525372
script/vm/value.lua
@@ -9,6 +9,9 @@ function vm.testCondition(source)
9
return nil
10
end
11
local node = vm.compileNode(source)
12
+ if node.optional then
13
+ return nil
14
+ end
15
local hasTrue, hasFalse
16
for n in node:eachObject() do
17
if n.type == 'boolean'
test/type_inference/init.lua
@@ -3209,3 +3209,12 @@ local n
3209
3210
print(<?n?>)
3211
]]
3212
+
3213
+TEST 'integer' [[
3214
+---@type integer?
3215
+local n
3216
+if true then
3217
+ n = 0
3218
+end
3219
+local <?x?> = n or 0
3220
+]]
0 commit comments