[svn]
r6992: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
VladD2
svnadmin at nemerle.org
Fri Nov 24 04:48:55 CET 2006
Log:
Fix extension methods completion.
Author: VladD2
Date: Fri Nov 24 04:48:54 2006
New Revision: 6992
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n Fri Nov 24 04:48:54 2006
@@ -225,6 +225,25 @@
Token.BracesGroup(null)
} // return empty body!
}
+
+ /// Return true if 'method' is extension method.
+ protected override IsExtensionMethod (method : IMethod, tyVar : TyVar) : bool
+ {
+ match (method.GetFreshType())
+ {
+ | (MType.Fun(from, _), _) =>
+ match (from.Fix().GetFunctionArguments())
+ {
+ | paramMType :: _ =>
+ def res = paramMType.TryProvide(tyVar);
+ assert(true);
+ res
+
+ | _ => false
+ }
+ | _ => false
+ }
+ }
} // end class Engine
} // end namespace
More information about the svn
mailing list