Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Downward inference of parameter types #203

Closed
vsmenon opened this issue Jun 2, 2015 · 1 comment
Closed

Downward inference of parameter types #203

vsmenon opened this issue Jun 2, 2015 · 1 comment

Comments

@vsmenon
Copy link
Contributor

vsmenon commented Jun 2, 2015

In the closure in following code, we infer the return type (as int), but not the parameter types (left as dynamic):

typedef int Foo(int x, int y);

void bar() {
  Foo f = (x, y) => x+y;
}

That is sound, but suboptimal - x+y is handled via a dynamic invoke in generated code.

@leafpetersen
Copy link
Contributor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants