Created
April 11, 2014 20:07
-
-
Save ckwalsh/10497446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ckwalsh@ckwalsh:~$ cat foo.php | |
<?hh | |
namespace Foo; | |
class Bar { | |
function foobar(): this { | |
return $this; | |
} | |
} | |
$b = new Bar(); | |
$b2 = $b->foobar(); | |
ckwalsh@ckwalsh:~$ hhvm foo.php | |
Fatal error: Value returned from Foo\Bar::foobar() must be of type Foo\this, Foo\Bar given in /home/ckwalsh/foo.php on line 7 | |
ckwalsh@ckwalsh:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment