[Mono-dev] Isolated another Moq related VM bug.

Bas Smit basjsmit at gmail.com
Fri Feb 6 13:30:09 EST 2009


Hi guys,

me again, found another Moq related VM bug. Submitted here:
https://bugzilla.novell.com/show_bug.cgi?id=473482

This one is peculiar, it fails on line: var t = ex.StackTrace;

Regards, Bas




using System;

public class Program
{
    static void Main()
    {
        try
        {
            new Foo<object>(0, 0);
        }
        catch (Exception ex)
        {
          var t = ex.StackTrace; <==
        }
    }
}

public class Foo<T> : FooBase
{
    int i;
    int ii;

    public Foo(int i, int ii)
    {
        this.i = i;
        this.ii = ii;
        this.iii = 0;
        throw new Exception();
    }
}

public abstract class FooBase
{
    protected int iii;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090206/f9b313b9/attachment.html 


More information about the Mono-devel-list mailing list