curiosity-ai / h5

🚀 The next generation C# to JavaScript compiler
https://github.com/curiosity-ai/h5
Apache License 2.0
226 stars 31 forks source link

Local functions No build #90

Closed 2505817596 closed 1 year ago

2505817596 commented 1 year ago

Reproduce the code:

static void Main(string[] args) { if (true) { void Test() { } if(true) { void Test1() { } Test1(); } } }

results: H5.define("FightCore.Program", { main: function Main (args) { if (true) { var Test = null; Test = function () { }; if (true) { [UnknownIdentifierResolveResult Test1](); } } } });

theolivenbaum commented 1 year ago

@2505817596 Think I finally found a fix for this with 16c6677e38076afeb5fe88b6c4decd06a8e42292, let me know if you still see the issue with the new release.