[Mono-bugs] [Bug 412880] New: [PATCH] wrong Modifiers.GetDescription() causes compiler crash
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jul 29 07:05:43 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=412880
Summary: [PATCH] wrong Modifiers.GetDescription() causes compiler
crash
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Minor
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: atsushi at ximian.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
The following code causes compiler crash:
class Foo
{
protected internal virtual void X ()
{
}
}
class Bar : Foo
{
protected override void X ()
{
}
}
----
(The override should be protected internal.)
$ gmcs foa.cs
Unhandled Exception: Mono.CSharp.InternalErrorException: foa.cs(10,33): Bar.X()
---> System.NotImplementedException: FamORAssem
at Mono.CSharp.Modifiers.GetDescription (MethodAttributes ma) [0x00000]
at Mono.CSharp.InterfaceMemberBase.Error_CannotChangeAccessModifiers
(Location
loc, System.Reflection.MemberInfo base_method, MethodAttributes ma,
System.Stri
ng suffix) [0x00000]
at Mono.CSharp.InterfaceMemberBase.CheckMethodAgainstBase (System.Type
base_me
thod_type) [0x00000]
at Mono.CSharp.InterfaceMemberBase.CheckBase () [0x00000]
at Mono.CSharp.MethodCore.CheckBase () [0x00000]
at Mono.CSharp.MethodOrOperator.CheckBase () [0x00000]
at Mono.CSharp.MethodOrOperator.Define () [0x00000]
at Mono.CSharp.Method.Define () [0x00000]
at Mono.CSharp.TypeContainer+MemberCoreArrayList.DefineContainerMembers ()
[0x
00000]
--- End of inner exception stack trace ---
at Mono.CSharp.TypeContainer+MemberCoreArrayList.DefineContainerMembers ()
[0x
00000]
at Mono.CSharp.TypeContainer.DefineContainerMembers
(Mono.CSharp.MemberCoreArr
ayList mcal) [0x00000]
at Mono.CSharp.Class.DefineContainerMembers (Mono.CSharp.MemberCoreArrayList
l
ist) [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.Compile () [0x00000]
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]
It is one liner fix in modifiers.cs:
atsushi at PC ~/svn/mcs/mcs
$ svn diff
Index: modifiers.cs
===================================================================
--- modifiers.cs (revision 109139)
+++ modifiers.cs (working copy)
@@ -95,7 +95,7 @@
if (ma == MethodAttributes.Public)
return "public";
- if (ma == MethodAttributes.FamANDAssem)
+ if (ma == MethodAttributes.FamORAssem)
return "protected internal";
if (ma == MethodAttributes.Private)
--
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