fjgandrade / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

Support 'using' resource keyword #213

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
try/finally, dispose

Original issue reported on code.google.com by DanelK...@gmail.com on 10 Sep 2012 at 10:27

GoogleCodeExporter commented 9 years ago
Also, the using statements is not a general problem. If the variable is 
declared before the using statement, I get an error.
So the following will give me an error (Unable to cast object of type 
'SharpKit.JavaScript.Ast.JsMemberExpression' to 
'SharpKit.JavaScript.Ast.JsVariableDeclarationStatement'):
var provider = Factory.GetProvider(..);
using(provider) { }

While this works:
using(var provider = Factory.GetProvider(..)) { }

Original comment by DanelK...@gmail.com on 10 Sep 2012 at 3:19