[Mono-bugs] [Bug 362573] New: Exception compiling this snippet
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Feb 16 21:34:15 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=362573
Summary: Exception compiling this snippet
Product: Mono: Compilers
Version: 1.9.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: alan.mcgovern at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
The snippet below cannot be compiled under mono, gmcs crashes with an unhandled
exception (see end). If the declaration of the static list is changed from
internal to public, it compiles fine.
using System.Collections.Generic;
namespace Name
{
public class Test
{
internal static List<int> List;
}
public class Subclass : Test
{
private List<int> list;
public List<int> List
{
get { return list; }
}
public static void Main(string[] args)
{
Subclass c = new Subclass();
}
}
}
The exception from gmcs:
Unhandled Exception: Mono.CSharp.InternalErrorException: test.cs(14,36):
Name.Subclass.List ---> System.NullReferenceException: Ob
ject reference not set to an instance of an object
at Mono.CSharp.MemberCache.FindMemberToOverride (System.Type invocation_type,
System.String name, System.Type[] param_types, Mon
o.CSharp.GenericMethod generic_method, Boolean is_property) [0x00000]
at Mono.CSharp.Property.ResolveBaseProperty () [0x00000]
at Mono.CSharp.PropertyBase.FindOutBaseMethod (System.Type& base_ret_type)
[0x00000]
at Mono.CSharp.InterfaceMemberBase.CheckBase () [0x00000]
at Mono.CSharp.Property.Define () [0x00000]
at Mono.CSharp.TypeContainer+MemberCoreArrayList.DefineContainerMembers ()
[0x00000] --- End of inner exception stack trace ---
at Mono.CSharp.TypeContainer+MemberCoreArrayList.DefineContainerMembers ()
[0x00000]
at Mono.CSharp.TypeContainer.DefineContainerMembers
(Mono.CSharp.MemberCoreArrayList mcal) [0x00000]
at Mono.CSharp.Class.DefineContainerMembers (Mono.CSharp.MemberCoreArrayList
list) [0x00000]
at Mono.CSharp.TypeContainer.DoDefineMembers () [0x00000]
at Mono.CSharp.Class.DoDefineMembers () [0x00000]
at Mono.CSharp.TypeContainer.DefineMembers () [0x00000]
at Mono.CSharp.RootContext.PopulateTypes () [0x00000]
at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000]
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list