[MonoTouch] Expressions?
Tim Scott
tscott at lunaversesoftware.com
Tue Oct 27 00:50:37 EDT 2009
Hi,
I am getting the following error (on the device, but not on the simulator).
Attempting to JIT compile method '(wrapper
managed-to-managed) System.Linq.Expressions.ParameterExpression
[]:System.Collections.Generic.ICollection`1.get_Count ()' while
running with --aot-only.
at System.Linq.Enumerable.ToArray[ParameterExpression]
(IEnumerable`1 source) [0x00000]
at System.Linq.Enumerable.ToReadOnlyCollection[ParameterExpression]
(IEnumerable`1 source) [0x00000]
at System.Linq.Expressions.Expression.Lambda[Func`2]
(System.Linq.Expressions.Expression body, IEnumerable`1 parameters)
[0x00000]
at System.Linq.Expressions.Expression.Lambda[Func`2]
(System.Linq.Expressions.Expression body,
System.Linq.Expressions.ParameterExpression[] parameters) [0x00000]
at BillIt.UI.Application.Main (System.String[] args) [0x00000]
You can replicate as follows:
public class Application
{
private static void Main (string[] args)
{
DemonstrateError(x => x.Bar);
}
public class Foo
{
public string Bar { get; set; }
}
private static void DemonstrateError(Expression<Func<Foo, string>>
expression)
{
}
}
This code does not seem to be doing any JIT compiling. Should this be
supported by MT? If so I will submit a defect ticket. Thanks.
By the way I discovered this the first time I tried to use Catnap, a simple
ORM I created, on the device. (Rather, Bruce Parrot first discovered it.)
I really hope that we will be able to declare and examine expressions (I
know we cannot compile then), because Catnap depends on it. Thanks again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20091026/f63bd9de/attachment-0001.html
More information about the MonoTouch
mailing list