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
-- Generated by CSharp.lua CompilerdolocalSystem=SystemSystem.namespace("Knapcode", function (namespace)
namespace.class("ClassA", function (namespace)
localMyMethodMyMethod=function ()
System.Console.WriteLine(System.String.JoinEnumerable(", ", System.Enum.GetValues(System.Int32)))
endreturn {
MyMethod=MyMethod
}
end)
end)
endSystem.init({
types= {
"Knapcode.ClassA"
}
})
If you call MyMethod you get this error:
C:\Users\joelv\Downloads\lua-5.3.6_Win64_bin\lua53.exe: .\out.lua:4274: attempt to call a nil value (method 'getIsEnum')
stack traceback:
.\out.lua:4274: in field 'GetValues'
.\out.lua:19537: in field 'MyMethod'
.\main.lua:3: in main chunk
[C]: in ?
This can be worked around with a source generator for all values or manually listing all values in source.
The text was updated successfully, but these errors were encountered:
joelverhagen
added a commit
to joelverhagen/FactorioTools
that referenced
this issue
Jan 3, 2024
Repro
Generated Lua:
If you call
MyMethod
you get this error:This can be worked around with a source generator for all values or manually listing all values in source.
The text was updated successfully, but these errors were encountered: