[svn] r6497: nemerle/trunk/ncc: hierarchy/TypeBuilder.n typing/Typer.n

VladD2 svnadmin at nemerle.org
Wed Aug 9 13:58:11 CEST 2006


Log:
1. Fix forming LocalValueCompletionPossibility. 2. Fix location of implicit ctor.

Author: VladD2
Date: Wed Aug  9 13:58:06 2006
New Revision: 6497

Modified:
   nemerle/trunk/ncc/hierarchy/TypeBuilder.n
   nemerle/trunk/ncc/typing/Typer.n

Modified: nemerle/trunk/ncc/hierarchy/TypeBuilder.n
==============================================================================
--- nemerle/trunk/ncc/hierarchy/TypeBuilder.n	(original)
+++ nemerle/trunk/ncc/hierarchy/TypeBuilder.n	Wed Aug  9 13:58:06 2006
@@ -1804,6 +1804,14 @@
 
     /// define implicit instance constructor if none exists
     unless (instance_ctor_occured) {
+      // quasi-quotation use location from top of the Location_stack.
+      // Probably it's location of the class. It will lead to that location will 
+      // overlap the locations of other methods.
+
+      def loc = Location_stack.top ();
+      def loc = Location (loc.FileIndex, loc.Line, loc.Column, loc.Line, loc.Column);
+      Location_stack.push(loc);
+
       def ctor =
         // in abstract classes we have protected implicit ctor, otherwise public
         // http://www.jaggersoft.com/csharp_standard/17.10.4.htm
@@ -1812,6 +1820,9 @@
         else
           <[ decl: public this () { } ]>;
 
+      // Restore prevision top location.
+      ignore(Location_stack.pop());
+
       def meth = bind_and_add_member (ctor);
       meth.SetInstanceUsed ();
     }

Modified: nemerle/trunk/ncc/typing/Typer.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer.n	(original)
+++ nemerle/trunk/ncc/typing/Typer.n	Wed Aug  9 13:58:06 2006
@@ -1413,7 +1413,7 @@
             
           def overloads = local_context.Fold (overloads, fun (locname, x, acc) {
             if (locname.Id.StartsWith (name.Id))
-              LocalValueCompletionPossibility (this, x.Type, null, null, current_method_builder, null, x) :: acc
+              LocalValueCompletionPossibility (this, x.Type, null, null, CurrentMethodBuilder, null, x) :: acc
             else
               acc
           });



More information about the svn mailing list