curiosity-ai / h5

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

Local functions No build #90

Closed 2505817596 closed 11 months ago

2505817596 commented 11 months 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 11 months 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.