[Mono-bugs] [Bug 338439] New: inherited generic constraints crash gmcs
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Nov 1 12:24:05 EDT 2007
https://bugzilla.novell.com/show_bug.cgi?id=338439
Summary: inherited generic constraints crash gmcs
Product: Mono: Compilers
Version: 1.2
Platform: i686
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at ximian.com
ReportedBy: tobias.polley at miaplaza.com
QAContact: mono-bugs at ximian.com
Found By: ---
polley at nuitari:~$ cat Foo.cs
namespace TestCase {
class Pair<A,B> { }
abstract class Abstract {
internal abstract A GetA<A, B, PAIR>() where PAIR : Pair<A, B>;
}
class Concrete : Abstract {
internal override A GetA<A, B, PAIR>() {
throw new System.Exception();
}
}
}
polley at nuitari:~$ gmcs -d:NET_2_0 -target:library Foo.cs
Unhandled Exception: Mono.CSharp.InternalErrorException: Foo.cs(9,37):
TestCase.Concrete.GetA<A,B,PAIR>() ---> System.IndexOutOfRangeException: Array
index is out of range.
at Mono.CSharp.TypeParameter+InflatedConstraints.inflate (System.Type t)
[0x00000]
at Mono.CSharp.TypeParameter+InflatedConstraints.inflate (System.Type t)
[0x00000]
at Mono.CSharp.TypeParameter+InflatedConstraints..ctor
(Mono.CSharp.GenericConstraints gc, System.Type[] dargs) [0x00000]
at Mono.CSharp.TypeParameter+InflatedConstraints..ctor
(Mono.CSharp.GenericConstraints gc, System.Type declaring) [0x00000]
at Mono.CSharp.TypeParameter.DefineType (IResolveContext ec,
System.Reflection.Emit.MethodBuilder builder, System.Reflection.MethodInfo
implementing, Boolean is_override) [0x00000]
at Mono.CSharp.GenericMethod.DefineType (Mono.CSharp.EmitContext ec,
System.Reflection.Emit.MethodBuilder mb, System.Reflection.MethodInfo
implementing, Boolean is_override) [0x00000]
at Mono.CSharp.MethodData.Define (Mono.CSharp.DeclSpace parent) [0x00000]
at Mono.CSharp.MethodOrOperator.Define () [0x00000]
at Mono.CSharp.Method.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]
polley at nuitari:~$ gmcs --version
Mono C# compiler version 1.2.5.1
polley at nuitari:~$
while it compiles fine using
Microsoft (R) Visual C# 2005, Compilerversion 8.00.50727.42
für Microsoft (R) Windows (R) 2005 Framework, Version 2.0.50727
--
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