[Mono-list] Yet Another Bug Report
Adam Treat
manyoso@yahoo.com
Mon, 18 Feb 2002 02:46:47 -0800
I caught another one of these nasty buggers. Here is the code.
using System;
public class test
{
public static void Main(string[] args)
{
if(args.Length > 0)
{
Console.WriteLine(new string(args[0].ToCharArray()));
}
}
}
The problem is with mcs/corlib. Try compiling this with mcs running under
mint and you get 'file class.c: line 893 (mono_class_from_mono_type): should
not be reached' which is refering to the 'case MONO_TYPE_PTR:' line in
mono/mono/mono/metadata/class.c. As you can see the constructor is not
unsafe, although there are unsafe constructors for string types. Because,
this only occurs when running mcs under mint, so this is probably a bug in
reflection/type.cs. Sorry about not writing 'real' test cases. I promise
this is my last one, from now on i'll go learn how to write nunit tests ;-)
Cheers,
Adam