[svn] r5802: nemerle/trunk/ncc:
testsuite/positive/polymorphic-recursion.n typing/Typer2.n
malekith
svnadmin at nemerle.org
Wed Oct 5 19:47:42 CEST 2005
Log:
Don't inline polymorphic functions. Resolves #539.
Author: malekith
Date: Wed Oct 5 19:47:41 2005
New Revision: 5802
Modified:
nemerle/trunk/ncc/testsuite/positive/polymorphic-recursion.n
nemerle/trunk/ncc/typing/Typer2.n
Modified: nemerle/trunk/ncc/testsuite/positive/polymorphic-recursion.n
==============================================================================
--- nemerle/trunk/ncc/testsuite/positive/polymorphic-recursion.n (original)
+++ nemerle/trunk/ncc/testsuite/positive/polymorphic-recursion.n Wed Oct 5 19:47:41 2005
@@ -106,6 +106,8 @@
_ = zip4 ([]);
#endif
+ def poly_loop [A,B] (f : A -> B, x : A) { f (x) }
+ _ = poly_loop (1 + _, 42);
}
}
Modified: nemerle/trunk/ncc/typing/Typer2.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer2.n (original)
+++ nemerle/trunk/ncc/typing/Typer2.n Wed Oct 5 19:47:41 2005
@@ -392,7 +392,8 @@
foreach (v in locals)
match (v.ValKind) {
- | LocalValue.Kind.Function (h, _) when !h.closure_vars.IsEmpty =>
+ | LocalValue.Kind.Function (h, _)
+ when !h.closure_vars.IsEmpty || !h.typarms.IsEmpty =>
// we cannot yet deal with expanding these to loops
when (h.usage == FunctionUsage.UsedJustOnce)
h.usage = FunctionUsage.Used
More information about the svn
mailing list