[svn] r5939: nemerle/trunk/ncc:
testsuite/positive/polymorphic-recursion.n typing/Typer2.n
malekith
svnadmin at nemerle.org
Tue Nov 15 14:31:26 CET 2005
Log:
Set the Parm.required_type for polylocal-transformed-to-lambdas. Resolves #536.
Author: malekith
Date: Tue Nov 15 14:31:24 2005
New Revision: 5939
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 Tue Nov 15 14:31:24 2005
@@ -45,6 +45,14 @@
}
}
+module Bug536 {
+ foo () : void
+ {
+ def matchesf['a] (_ : object * object) { }
+ _ = matchesf;
+ }
+}
+
module M {
meth['a] (v : int, x : 'a) : 'a {
Modified: nemerle/trunk/ncc/typing/Typer2.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer2.n (original)
+++ nemerle/trunk/ncc/typing/Typer2.n Tue Nov 15 14:31:24 2005
@@ -455,7 +455,9 @@
LocalValue (lambda_header, fp.name, fp.ty,
LocalValue.Kind.FunParm (ParmKind.Normal),
is_mutable = false);
- Parm (TExpr.LocalRef (fp.ty, fp.decl))
+ def p = Parm (TExpr.LocalRef (fp.ty, fp.decl));
+ p.required_type = fp.ty;
+ p
});
def lambda_body =
TExpr.Call (ret_type, expr, parms_refs, false);
More information about the svn
mailing list