Hi,

This seems to be a compiler bug. I reported it here:
https://bugzilla.xamarin.com/show_bug.cgi?id=4340 - you can CC yourself on
it to be notified when it's fixed.

Rolf

On Fri, Apr 6, 2012 at 10:27 PM, aknabb <[email protected]> wrote:

> I'm getting an odd exception. If I put the following code in a function, I
> get a System.InvalidProgramException Invalid IL code exception when I try
> to
> call the function.
>
> object o = null;
> int? x = 3;
>
> if((int)o < x)
> {
>  x = 4;
> }
>
> Now, I would expect this code to have runtime problems (like a null
> reference exception), but I get the exception before any of this code is
> executed. Is this a problem in mono?
>
> Thanks,
> -Aaron
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Invalid-IL-Code-tp4538247p4538247.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to