Skip to content
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

Closure(...) not resolve correctly #661

Closed
ging-dev opened this issue Sep 19, 2024 · 1 comment
Closed

Closure(...) not resolve correctly #661

ging-dev opened this issue Sep 19, 2024 · 1 comment
Assignees
Labels
feature New feature or request

Comments

@ging-dev
Copy link

<?php

/**
 * @template T
 * @param Closure(...):T $closure
 * @return T
 */
function test(\Closure $closure) {

}


$a = test(function (): string {
    return '';
});

/** @trace $$a */

Maybe @param Closure(...):T $closure not resolve correctly.

@jakubmisek
Copy link
Member

jakubmisek commented Sep 20, 2024

Thank you for the test case.

We don't recognize three dots alone ....

The following works:

Closure():T 

Will be implemented.

@jakubmisek jakubmisek self-assigned this Sep 20, 2024
@jakubmisek jakubmisek added the feature New feature or request label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants