You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the redundant class qualifier is used to access a static property, the converter thinks it has to find the property somewhere else.
Example
using System;
namespace TestApp
{
class Program
{
public static string Test { get; set; }
static void Main(string[] args)
{
Console.WriteLine(Program.Test);
Console.WriteLine(Test);
}
}
}
Converts to:
-- Generated by CSharp.lua Compiler 1.1.0
local System = System
local TestApp
System.usingDeclare(function (global)
TestApp = global.TestApp
end)
System.namespace("TestApp", function (namespace)
namespace.class("Program", function (namespace)
local Main
Main = function (args)
System.Console.WriteLine(Test) -- note the converter tries to access something that doesn't exists in this context
System.Console.WriteLine(TestApp.Program.Test)
end
return {
Main = Main
}
end)
end)
Command I executed: >dotnet "CSharp.lua.Launcher.dll" -s "C:\Users\Joas\source\repos\TestApp\TestApp" -d "C:\Users\Joas\Desktop\Test"
Version: 1.1.3
I've tried debugging the issue, but I find it a lot of work since there's no technical documentation in the solution.
SIDE NOTE: Please consider at least adding ///<summary>'s for classes properties and methods.
The text was updated successfully, but these errors were encountered:
I've worked with the code a little bit. I think there is technical documentation in chinese as a document somewhere in the source tree.
This to me looks like a generation error, as I'm sure the C# AST tree is completely fine. So this issue is either when generating the Lua AST, or when generating Lua from the Lua AST
When the redundant class qualifier is used to access a static property, the converter thinks it has to find the property somewhere else.
Example
Converts to:
Command I executed:
>dotnet "CSharp.lua.Launcher.dll" -s "C:\Users\Joas\source\repos\TestApp\TestApp" -d "C:\Users\Joas\Desktop\Test"
Version: 1.1.3
I've tried debugging the issue, but I find it a lot of work since there's no technical documentation in the solution.
SIDE NOTE: Please consider at least adding
///<summary>
's for classes properties and methods.The text was updated successfully, but these errors were encountered: