11 March 2010

MOSA: Generic method compilation, first test succeeded

After about 3 hours patching and fixing the last issues I finally completed the first successful test of generics in MOSA. The following C# fragment compiles successfully and passes all tests:

static class Test
{
        private static T GenericMethod<T>(T value)
        {
                return value;
        }

public static bool TestCallGenericMethodWith(int value)
{
                return value == GenericMethod(value);
        }
}

It may not look like much, but this test is the ground for all other generic arguments and has moved forward not only the compiler, but also the assembly loader, the MOSA runtime and some other additions like cleaner error messages from mosacl.

I’ll finish this test case tomorrow and push my changes to Github, I’ll probably need some help with that from fellow MOSA contributors.

Good night.

2 comments:

illuminus said...

Exciting!

I can't wait to see the pipeline in reference to compiling something like that.

(I'll have to get over my Git phobia, first, I think...)

Michael said...

Actually the pipeline hasn't changed that much. I'll explain some of the changes in a post tonight.