[svn] r6428: nemerle/trunk/ncc: testsuite/positive/macrolib.n typing/Macros.n

nazgul svnadmin at nemerle.org
Tue Jul 4 22:30:33 CEST 2006


Log:
Fix mutable without initializer in quotations

Author: nazgul
Date: Tue Jul  4 22:30:31 2006
New Revision: 6428

Modified:
   nemerle/trunk/ncc/testsuite/positive/macrolib.n
   nemerle/trunk/ncc/typing/Macros.n

Modified: nemerle/trunk/ncc/testsuite/positive/macrolib.n
==============================================================================
--- nemerle/trunk/ncc/testsuite/positive/macrolib.n	(original)
+++ nemerle/trunk/ncc/testsuite/positive/macrolib.n	Tue Jul  4 22:30:31 2006
@@ -84,6 +84,8 @@
 
 macro ala()
 {
+  _ = <[ mutable somevar; somevar = 1 ]>;
+  
   /// test for <[ ]> matching
   match (<[ def (1,2) = 3; ]>) {
     | <[ def $_ = $_ ]> => ()

Modified: nemerle/trunk/ncc/typing/Macros.n
==============================================================================
--- nemerle/trunk/ncc/typing/Macros.n	(original)
+++ nemerle/trunk/ncc/typing/Macros.n	Tue Jul  4 22:30:31 2006
@@ -570,8 +570,8 @@
         <[ PExpr.Define ($(quoted_expr (name)), $(quoted_expr (val))) ]>
 
       | <[ mutable $name = $val ]> =>
-        <[ PExpr.DefMutable ($(quoted_expr (name)), $(quoted_expr (val))) ]>
-
+        def qval = if (val == null) <[ null ]> else quoted_expr (val);
+        <[ PExpr.DefMutable ($(quoted_expr (name)), $qval) ]>
         
       | <[ def .. $funs ]> =>
         match (funs) {



More information about the svn mailing list