https://bugzilla.novell.com/show_bug.cgi?id=653710
https://bugzilla.novell.com/show_bug.cgi?id=653710#c1 --- Comment #1 from Thomas Philpot <[email protected]> 2010-12-06 21:19:39 UTC --- Here's a patch which seems to fix the problem by looking at the type specifiers if the initial condition is not satisfied. diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs index e05c459..45770fd 100644 --- a/mcs/mcs/generic.cs +++ b/mcs/mcs/generic.cs @@ -691,7 +691,21 @@ namespace Mono.CSharp { // public bool IsReferenceType { get { - return (spec & SpecialConstraint.Class) != 0 || HasTypeConstraint; + if ((spec & SpecialConstraint.Class) != 0 || HasTypeConstraint) + return true; + + if (targs != null) { + foreach (TypeSpec typeSpec in targs) { + if (typeSpec != null) { + TypeParameterSpec typeParamSpec = typeSpec as TypeParameterSpec; + if (typeParamSpec != null && typeParamSpec.IsReferenceType) { + return true; + } + } + } + } + + return false; } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
