Browse Source

Revert "Revert "[TypeSystem] Specialized method now contains a flag specifying the""

This reverts commit b758539431.
pull/32/merge
Mike Krüger 13 years ago
parent
commit
c76240e934
  1. 2
      ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs
  2. 8
      ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMethod.cs

2
ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs

@ -950,6 +950,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
if (member == null) if (member == null)
throw new InvalidOperationException(); throw new InvalidOperationException();
if (this.IsExtensionMethodInvocation && member is SpecializedMethod)
((SpecializedMethod)member).IsExtendedExtensionMethod = true;
return new CSharpInvocationResolveResult( return new CSharpInvocationResolveResult(
this.IsExtensionMethodInvocation ? new TypeResolveResult(member.DeclaringType) : targetResolveResult, this.IsExtensionMethodInvocation ? new TypeResolveResult(member.DeclaringType) : targetResolveResult,
member, member,

8
ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMethod.cs

@ -154,6 +154,14 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
} }
} }
/// <summary>
/// Gets/Sets whether the method is an extension method that are being called using extension method syntax.
/// </summary>
public bool IsExtendedExtensionMethod {
get;
set;
}
public override IMemberReference ToMemberReference() public override IMemberReference ToMemberReference()
{ {
// Pass the MethodTypeArguments to the SpecializingMemberReference only if // Pass the MethodTypeArguments to the SpecializingMemberReference only if

Loading…
Cancel
Save