@@ -36,6 +36,128 @@ ____exports.__result = 10 - (4 + 5)
3636return ____exports"
3737` ;
3838
39+ exports [` Bitop [5.1] ("~a"): code 1` ] = `
40+ "local ____exports = { }
41+ ____exports.__result = bit.bnot(a)
42+ return ____exports"
43+ ` ;
44+
45+ exports [` Bitop [5.1] ("~a"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
46+
47+ exports [` Bitop [5.1] ("a& =b"): code 1` ] = `
48+ "local ____exports = { }
49+ ____exports.__result = (function()
50+ a = bit.band(a, b)
51+ return a
52+ end)()
53+ return ____exports"
54+ ` ;
55+
56+ exports [` Bitop [5.1] ("a& =b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
57+
58+ exports [` Bitop [5.1] ("a& b"): code 1` ] = `
59+ "local ____exports = { }
60+ ____exports.__result = bit.band(a, b)
61+ return ____exports"
62+ ` ;
63+
64+ exports [` Bitop [5.1] ("a& b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
65+
66+ exports [` Bitop [5.1] ("a<<=b"): code 1` ] = `
67+ "local ____exports = { }
68+ ____exports.__result = (function()
69+ a = bit.lshift(a, b)
70+ return a
71+ end)()
72+ return ____exports"
73+ ` ;
74+
75+ exports [` Bitop [5.1] ("a<<=b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
76+
77+ exports [` Bitop [5.1] ("a<<b"): code 1` ] = `
78+ "local ____exports = { }
79+ ____exports.__result = bit.lshift(a, b)
80+ return ____exports"
81+ ` ;
82+
83+ exports [` Bitop [5.1] ("a<<b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
84+
85+ exports [` Bitop [5.1] ("a>>=b"): code 1` ] = `
86+ "local ____exports = { }
87+ ____exports.__result = (function()
88+ a = bit.arshift(a, b)
89+ return a
90+ end)()
91+ return ____exports"
92+ ` ;
93+
94+ exports [` Bitop [5.1] ("a>>=b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
95+
96+ exports [` Bitop [5.1] ("a>>>=b"): code 1` ] = `
97+ "local ____exports = { }
98+ ____exports.__result = (function()
99+ a = bit.rshift(a, b)
100+ return a
101+ end)()
102+ return ____exports"
103+ ` ;
104+
105+ exports [` Bitop [5.1] ("a>>>=b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
106+
107+ exports [` Bitop [5.1] ("a>>>b"): code 1` ] = `
108+ "local ____exports = { }
109+ ____exports.__result = bit.rshift(a, b)
110+ return ____exports"
111+ ` ;
112+
113+ exports [` Bitop [5.1] ("a>>>b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
114+
115+ exports [` Bitop [5.1] ("a>>b"): code 1` ] = `
116+ "local ____exports = { }
117+ ____exports.__result = bit.arshift(a, b)
118+ return ____exports"
119+ ` ;
120+
121+ exports [` Bitop [5.1] ("a>>b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
122+
123+ exports [` Bitop [5.1] ("a^=b"): code 1` ] = `
124+ "local ____exports = { }
125+ ____exports.__result = (function()
126+ a = bit.bxor(a, b)
127+ return a
128+ end)()
129+ return ____exports"
130+ ` ;
131+
132+ exports [` Bitop [5.1] ("a^=b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
133+
134+ exports [` Bitop [5.1] ("a^b"): code 1` ] = `
135+ "local ____exports = { }
136+ ____exports.__result = bit.bxor(a, b)
137+ return ____exports"
138+ ` ;
139+
140+ exports [` Bitop [5.1] ("a^b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
141+
142+ exports [` Bitop [5.1] ("a|=b"): code 1` ] = `
143+ "local ____exports = { }
144+ ____exports.__result = (function()
145+ a = bit.bor(a, b)
146+ return a
147+ end)()
148+ return ____exports"
149+ ` ;
150+
151+ exports [` Bitop [5.1] ("a|=b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
152+
153+ exports [` Bitop [5.1] ("a|b"): code 1` ] = `
154+ "local ____exports = { }
155+ ____exports.__result = bit.bor(a, b)
156+ return ____exports"
157+ ` ;
158+
159+ exports [` Bitop [5.1] ("a|b"): diagnostics 1` ] = ` "main.ts(1,25): error TSTL: Bitwise operations is/are not supported for target Lua 5.1."` ;
160+
39161exports [` Bitop [5.2] ("~a") 1` ] = `
40162"local ____exports = { }
41163____exports.__result = bit32.bnot(a)
0 commit comments