diff options
author | Martin Baulig <martin@novell.com> | 2006-03-16 20:18:05 +0300 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2006-03-16 20:18:05 +0300 |
commit | 1caa099f1c2895d6f54ee4d69b085866d6ec2576 (patch) | |
tree | 402add076324b9e29c8a9aac7c80c42841b117bf /mcs/gmcs/typemanager.cs | |
parent | bff6e6ed3588d2c5a2daf257b4cf16b9a5cf5c72 (diff) |
2006-03-16 Martin Baulig <martin@ximian.com>
* generic.cs
(ConstraintChecker.HasDefaultConstructor): If we're a TypeBuilder
and don't have any instance constructors, also lookup in the base class.
(TypeManager.IsNullableValueType): New public method.
* typemanager.cs (TypeManager.MemberLookup_FindMembers): Clear the
`BindingFlags.DeclaredOnly' flag and set `used_cache'.
(TypeManager.TryGetBaseDefinition): Use DropGenericMethodArguments().
* expression.cs (Unary.DoResolve): Use TypeManager.IsNullableValueType()
instead of just TypeManager.IsNullableType() to determine whether
a lifted operator exists.
(UnaryMutator.DoResolve): Likewise.
(Conditional.DoResolve): Likewise.
(Binary.DoResolve): A lifted operator only exists if both operands
are valuetypes and at least one of them is a nullable type.
svn path=/trunk/mcs/; revision=58071
Diffstat (limited to 'mcs/gmcs/typemanager.cs')
-rw-r--r-- | mcs/gmcs/typemanager.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mcs/gmcs/typemanager.cs b/mcs/gmcs/typemanager.cs index f18162c3a9e..be693e3f893 100644 --- a/mcs/gmcs/typemanager.cs +++ b/mcs/gmcs/typemanager.cs @@ -1402,10 +1402,10 @@ public partial class TypeManager { MemberList list; Timer.StartTimer (TimerType.FindMembers); - list = tparam.FindMembers (mt, bf | BindingFlags.DeclaredOnly, + list = tparam.FindMembers (mt, bf & ~BindingFlags.DeclaredOnly, FilterWithClosure_delegate, name); Timer.StopTimer (TimerType.FindMembers); - used_cache = false; + used_cache = true; return (MemberInfo []) list; } @@ -1805,6 +1805,8 @@ public partial class TypeManager { static public MethodBase TryGetBaseDefinition (MethodBase m) { + m = DropGenericMethodArguments (m); + return (MethodBase) method_overrides [m]; } |