Conversion fails on yield statements
Closed this issue · 1 comments
I'm running conversion on a older project, with command
UnityScript2CSharp.exe -p D:\Unity\SWC_Android -u D:\Unity\Unity5.6.2f1 -s UNITY_ANDROID,UNITY_EDITOR -d -v -n
on
UnityScript2CSharp_1.0.6549.34518.
"yield w;" is always failed on with invalid cast error, where w is WWW object
D:\Unity\SWC_Android\Assets_SWC_scripts\controlers\gamemaster.js(1305,11): BCE0055: Internal compiler error: Unable to cast object of type 'Boo.Lang.Compiler.TypeSystem.Internal.InternalLocal' to type 'Boo.Lang.Compiler.TypeSystem.IType'..
System.InvalidCastException: Unable to cast object of type 'Boo.Lang.Compiler.TypeSystem.Internal.InternalLocal' to type 'Boo.Lang.Compiler.TypeSystem.IType'.
at UnityScript2CSharp.Steps.InjectTypeOfExpressionsInArgumentsOfSystemType.OnReferenceExpression(ReferenceExpression node) in D:\Work\repo\unityscript2csharp\UnityScript2CSharp\Steps\InjectTypeOfExpressionsInArgumentsOfSystemType.cs:line 45
at Boo.Lang.Compiler.Ast.ReferenceExpression.Accept(IAstVisitor visitor) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\ReferenceExpressionImpl.cs:line 69
at Boo.Lang.Compiler.Ast.DepthFirstTransformer.OnNode(Node node) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstTransformer.cs:line 54
at Boo.Lang.Compiler.Ast.DepthFirstTransformer.VisitNode(Node node) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstTransformer.cs:line 65
Consider running converter with '-i' option.