@@ -335,6 +335,87 @@ ____exports.__result = a | b
335335return ____exports"
336336`;
337337
338+ exports[`Bitop [5.4] ("~a") 1`] = `
339+ " local ____exports = {}
340+ ____exports.__result = ~a
341+ return ____exports"
342+ `;
343+
344+ exports[`Bitop [5.4] ("a&=b") 1`] = `
345+ " local ____exports = {}
346+ ____exports.__result = (function()
347+ a = a & b
348+ return a
349+ end)()
350+ return ____exports"
351+ `;
352+
353+ exports[`Bitop [5.4] ("a&b") 1`] = `
354+ " local ____exports = {}
355+ ____exports.__result = a & b
356+ return ____exports"
357+ `;
358+
359+ exports[`Bitop [5.4] ("a<<=b") 1`] = `
360+ " local ____exports = {}
361+ ____exports.__result = (function()
362+ a = a << b
363+ return a
364+ end)()
365+ return ____exports"
366+ `;
367+
368+ exports[`Bitop [5.4] ("a<<b") 1`] = `
369+ " local ____exports = {}
370+ ____exports.__result = a << b
371+ return ____exports"
372+ `;
373+
374+ exports[`Bitop [5.4] ("a>>>=b") 1`] = `
375+ " local ____exports = {}
376+ ____exports.__result = (function()
377+ a = a >> b
378+ return a
379+ end)()
380+ return ____exports"
381+ `;
382+
383+ exports[`Bitop [5.4] ("a>>>b") 1`] = `
384+ " local ____exports = {}
385+ ____exports.__result = a >> b
386+ return ____exports"
387+ `;
388+
389+ exports[`Bitop [5.4] ("a^=b") 1`] = `
390+ " local ____exports = {}
391+ ____exports.__result = (function()
392+ a = a ~ b
393+ return a
394+ end)()
395+ return ____exports"
396+ `;
397+
398+ exports[`Bitop [5.4] ("a^b") 1`] = `
399+ " local ____exports = {}
400+ ____exports.__result = a ~ b
401+ return ____exports"
402+ `;
403+
404+ exports[`Bitop [5.4] ("a|=b") 1`] = `
405+ " local ____exports = {}
406+ ____exports.__result = (function()
407+ a = a | b
408+ return a
409+ end)()
410+ return ____exports"
411+ `;
412+
413+ exports[`Bitop [5.4] ("a|b") 1`] = `
414+ " local ____exports = {}
415+ ____exports.__result = a | b
416+ return ____exports"
417+ `;
418+
338419exports[`Bitop [JIT] ("~a") 1`] = `
339420" local ____exports = {}
340421____exports.__result = bit.bnot(a)
@@ -553,3 +634,22 @@ return ____exports"
553634`;
554635
555636exports[`Unsupported bitop 5.3 ("a>>b"): diagnostics 1`] = `"main.ts(1,25): error TSTL: Right shift operator is not supported for target Lua 5.3. Use \`>>>\` instead."`;
637+
638+ exports[`Unsupported bitop 5.4 ("a>>=b"): code 1`] = `
639+ " local ____exports = {}
640+ ____exports.__result = (function()
641+ a = a >> b
642+ return a
643+ end)()
644+ return ____exports"
645+ `;
646+
647+ exports[`Unsupported bitop 5.4 ("a>>=b"): diagnostics 1`] = `"main.ts(1,25): error TSTL: Right shift operator is not supported for target Lua 5.3. Use \`>>>\` instead."`;
648+
649+ exports[`Unsupported bitop 5.4 ("a>>b"): code 1`] = `
650+ " local ____exports = {}
651+ ____exports.__result = a >> b
652+ return ____exports"
653+ `;
654+
655+ exports[`Unsupported bitop 5.4 ("a>>b"): diagnostics 1`] = `"main.ts(1,25): error TSTL: Right shift operator is not supported for target Lua 5.3. Use \`>>>\` instead."`;
0 commit comments