internal class Program
{
private static void Main()
{
(int X, int Y) a = (1, 2);
switch (a)
{
case (1, 2):
Console.WriteLine("match");
break;
default:
Console.WriteLine("no match");
break;
}
}
}
Generated Lua:
-- Generated by CSharp.lua Compiler
do
local System = System
System.namespace("", function (namespace)
namespace.class("Program", function (namespace)
local Main
Main = function ()
local a = System.ValueTuple(1, 2)
repeat
local default = a
if extern == 1 and extern == 2 then -- extern is never set
System.Console.WriteLine("match")
break
else
System.Console.WriteLine("no match")
break
end
until 1
end
return {
Main = Main
}
end)
end)
end
System.init({
types = {
"Program"
}
})
Program.Main()
Repro:
Generated Lua: