[svn] r6782: nemerle/trunk/macros/core.n

VladD2 svnadmin at nemerle.org
Tue Oct 24 16:05:38 CEST 2006


Log:
Fix .ctor location in Record macro.

Author: VladD2
Date: Tue Oct 24 16:05:37 2006
New Revision: 6782

Modified:
   nemerle/trunk/macros/core.n

Modified: nemerle/trunk/macros/core.n
==============================================================================
--- nemerle/trunk/macros/core.n	(original)
+++ nemerle/trunk/macros/core.n	Tue Oct 24 16:05:37 2006
@@ -590,7 +590,9 @@
       def (assigns, parms) = List.FoldLeft (flds, ([], []), collect);
       
       def body = <[ { ..$(base_call :: assigns) } ]>;
-      body.loc = par.Location;
+      def loc1 = par.Location;
+      def loc2 = Location(loc1.FileIndex, loc1.Line, loc1.Column, loc1.Line, loc1.Column);
+      body.loc = loc2;
       
       def attrs = Modifiers (mods = 
         match (par.GetTydecl ()) {
@@ -600,7 +602,7 @@
         
       def parms = List.Append (ctor_parms, List.Rev (parms));
       def meth = <[ decl: ..$attrs this (..$parms) $body ]>;
-      meth.loc = par.Location;
+      meth.loc = loc2;
 
       /// we do not try to add empty constructor if it exists
       if (parms is []) {



More information about the svn mailing list