@@ -446,3 +446,58 @@ function fooIsCallable($x, bool $b)
446446 is_callable ($ x , $ b , $ name );
447447 assertType ('callable-string ' , $ name );
448448}
449+
450+ function noParamOut (string &$ s ): void
451+ {
452+
453+ }
454+
455+ function noParamOutVariadic (string &...$ s ): void
456+ {
457+
458+ }
459+
460+ function ($ s ): void {
461+ assertType ('mixed ' , $ s );
462+ noParamOut ($ s );
463+ assertType ('string ' , $ s );
464+ };
465+
466+ function ($ s , $ t ): void {
467+ assertType ('mixed ' , $ s );
468+ assertType ('mixed ' , $ t );
469+ noParamOutVariadic ($ s , $ t );
470+ assertType ('string ' , $ s );
471+ assertType ('string ' , $ t );
472+ };
473+
474+ class NoParamOutClass
475+ {
476+
477+ function doFoo (string &$ s ): void
478+ {
479+
480+ }
481+
482+ function doFooVariadic (string &...$ s ): void
483+ {
484+
485+ }
486+
487+ }
488+
489+ function ($ s ): void {
490+ assertType ('mixed ' , $ s );
491+ $ c = new NoParamOutClass ();
492+ $ c ->doFoo ($ s );
493+ assertType ('string ' , $ s );
494+ };
495+
496+ function ($ s , $ t ): void {
497+ assertType ('mixed ' , $ s );
498+ assertType ('mixed ' , $ t );
499+ $ c = new NoParamOutClass ();
500+ $ c ->doFooVariadic ($ s , $ t );
501+ assertType ('string ' , $ s );
502+ assertType ('string ' , $ t );
503+ };
0 commit comments