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

Casting class to string should raise error #6

Closed
muglug opened this issue Dec 9, 2016 · 0 comments
Closed

Casting class to string should raise error #6

muglug opened this issue Dec 9, 2016 · 0 comments
Labels

Comments

@muglug
Copy link
Collaborator

muglug commented Dec 9, 2016

Should be errors:

class A {}
echo (new A);
class A {
    function __toString() : void { }
}
echo (new A);
class A {
    function __toString() { }
}
echo (new A);

should not be an error:

class A {
    function __toString() : string {
        return 'hello';
    }
}
echo (new A);
@muglug muglug added the bug label Dec 9, 2016
@muglug muglug closed this as completed in b3106c6 Dec 9, 2016
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

1 participant