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

Invalid return type annotation when generating stubs #1990

Closed
sergeyklay opened this issue Oct 30, 2019 · 1 comment
Closed

Invalid return type annotation when generating stubs #1990

sergeyklay opened this issue Oct 30, 2019 · 1 comment
Assignees
Labels

Comments

@sergeyklay
Copy link
Contributor

When generating stubs, only existing and valid data types should be used.

Zephir code:

    public function test() -> char
    {
        char a = 'A';

        return a;
    }

Expected result:

    /**
     * @return int
     */
    public function test(): int
    {
    }

Actual result:

    /**
     * @return char
     */
    public function test(): int
    {
    }
@sergeyklay
Copy link
Contributor Author

Fixed in the development branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants