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
Assignees
Labels
bug

Comments

@sergeyklay
Copy link
Member

@sergeyklay sergeyklay commented Oct 30, 2019

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

This comment has been minimized.

Copy link
Member Author

@sergeyklay sergeyklay commented Nov 9, 2019

Fixed in the development branch.

@sergeyklay sergeyklay closed this Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.