[svn] r6227: nemerle/trunk/ncc: generation/MatchingCompiler.n testsuite/positive/matching-over-properties....

malekith svnadmin at nemerle.org
Fri May 5 13:14:15 CEST 2006


Log:
Set proper type for getter invocation in matching. Resolves #622.

Author: malekith
Date: Fri May  5 13:14:13 2006
New Revision: 6227

Modified:
   nemerle/trunk/ncc/generation/MatchingCompiler.n
   nemerle/trunk/ncc/testsuite/positive/matching-over-properties.n

Modified: nemerle/trunk/ncc/generation/MatchingCompiler.n
==============================================================================
--- nemerle/trunk/ncc/generation/MatchingCompiler.n	(original)
+++ nemerle/trunk/ncc/generation/MatchingCompiler.n	Fri May  5 13:14:13 2006
@@ -1130,7 +1130,7 @@
         | prop is IProperty =>
           def meth = prop.GetGetter ();
           def methref =
-            TExpr.MethodRef (meth.GetMemType (), val, meth, [], false);
+            TExpr.MethodRef (MType.ConstructFunctionType ([], ty), val, meth, [], false);
           TExpr.Call (ty, methref, [], false)
 
         | _ => Util.ice ()

Modified: nemerle/trunk/ncc/testsuite/positive/matching-over-properties.n
==============================================================================
--- nemerle/trunk/ncc/testsuite/positive/matching-over-properties.n	(original)
+++ nemerle/trunk/ncc/testsuite/positive/matching-over-properties.n	Fri May  5 13:14:13 2006
@@ -97,6 +97,10 @@
       | PreHelp => {}
       | _ => assert (false)
     }
+
+    // bug 622
+    def (Key = _x, Value = _y) = System.Collections.Generic.KeyValuePair ();
+
   }
 }
 }



More information about the svn mailing list