Skip to content

Properly resolve function type from function name #833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 13, 2019

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Sep 10, 2019

Fixes

function FF(x: i32): i32 { return x; }
function GG(x: i32): i32 { return x + 2; }

var b = false;
assert(
  (b ? FF : GG)(1).toString()
  ==
  "3"
);

not compiling, even though

const FF = (x: i32): i32 => x;
const GG = (x: i32): i32 => x + 2;

...

compiles.

@dcodeIO dcodeIO merged commit 9af14b8 into master Sep 13, 2019
@dcodeIO dcodeIO deleted the resolve-ftype-by-fname branch November 8, 2019 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant