blob: 73904a7479e97f9494ad8b07ff26a1f965d85a7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
TEST [[
---@type iolib
_ENV = io
<!print!>(stderr) -- `print` is warning but `stderr` is not
]]
TEST [[
---@type iolib
local _ENV = io
<!print!>(stderr) -- `print` is warning but `stderr` is not
]]
TEST [[
local _ENV = { print = print }
print(1)
]]
TEST [[
_ENV = {}
GLOBAL = 1 --> _ENV.GLOBAL = 1
]]
TEST [[
_ENV = {}
local _ = print --> local _ = _ENV.print
]]
TEST [[
GLOBAL = 1
_ENV = nil
]]
TEST [[
print(1)
_ENV = nil
]]
|