Skip to content

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Aug 16, 2019

As surfaced here, this PR makes

function test<T>(): void {
}

test();

emit an error instead of hitting an assertion, since if T is not the type of a function parameter, it has not been and cannot be inferred, and is effectively unknown inside of the function body.

@dcodeIO dcodeIO merged commit a08c7cb into master Aug 21, 2019
@MaxGraey
Copy link
Member

Is it solve this issue?

@dcodeIO
Copy link
Member Author

dcodeIO commented Aug 21, 2019

I think so. Will now emit an error if test() is called without T.

@MaxGraey
Copy link
Member

Great!

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.

2 participants