mgusmano / sharpkit

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

Using linq expression in code crashes compiler with unclear error message #141

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a SharpKit/C# class and decorate it with [JsType(Mode = JsMode.Clr, 
Filename = "res/Runner.js")]
2. Somewhere in a instance method use a linq syntax: 
var fieldsHtml = (from field in screenDefinition.Fields let visible = 
field.Visible == null || 
                    field.Visible(screenDefinition) where visible 
                    select ScreenContent.BuildField(field, screenDefinition)).ToList();
3. Compile the project               
4. Error :SKC : error SK0000: Object reference not set to an instance of an 
object.
  SharpKit.Compiler.CompilerException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.

What is the expected output? 
I Hope to see message informing me Linq is not supported with a line number or 
otherwise a general line number where the compiler has problems.

What do you see instead?
A error message too unspecific.

What version of the product are you using? On what operating system?
Sharpkit 5 on vs 2010 on win 7.

Please provide any additional information below.

Original issue reported on code.google.com by mmuur...@gmail.com on 5 Jun 2012 at 2:42

GoogleCodeExporter commented 8 years ago
Thanks for the report, I'll check it out!

Original comment by DanelK...@gmail.com on 5 Jun 2012 at 3:33

GoogleCodeExporter commented 8 years ago
As far as I can tell, this has been resolved. Can anyone confirm?

Original comment by yvan.rod...@gmail.com on 5 Dec 2012 at 5:06

GoogleCodeExporter commented 8 years ago

Original comment by DanelK...@gmail.com on 28 Jan 2013 at 4:54