[svn] r6915: vs-plugin/trunk/Nemerle.Compiler.Utils:
Nemerle.Completion2/CodeModel/Project.Type.n Utils.n
VladD2
svnadmin at nemerle.org
Thu Nov 16 19:45:40 CET 2006
Log:
Refactoring.
Author: VladD2
Date: Thu Nov 16 19:45:38 2006
New Revision: 6915
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n Thu Nov 16 19:45:38 2006
@@ -145,7 +145,7 @@
{
if (ast.header.ret_type.Location.Contains(line, col))
checkType(ast.header.ret_type, method.ReturnType);
- else if (ast.modifiers.custom_attrs.Contains(line, col))
+ else if (ast.modifiers.custom_attrs.OrderedContains(line, col))
{
// PB06116: TODO: CustomAttributes
//
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n Thu Nov 16 19:45:38 2006
@@ -324,9 +324,12 @@
false
}
- public Contains[a'](this lst : list[a'], testLine : int, testCol : int) : bool
- where a' : Located
+ /// The 'lst' must be ordered. This function test only first and last elements.
+ public OrderedContains[T](this lst : list[T], testLine : int, testCol : int) : bool
+ where T : Located
{
+ Debug.Assert(lst.IsOrdered((x, y) => x.Location.CompareTo(y.Location) > 0));
+
if (lst.IsEmpty)
false
else
More information about the svn
mailing list