hhvm / hacktest

A unit testing framework for Hack
MIT License
29 stars 12 forks source link

Add aliasses for noreturn functions with nothing #109

Closed lexidor closed 2 years ago

lexidor commented 2 years ago

The noreturn variants affect the typechecker in interesting ways. This is often surpricing and breaks tests using expect($it)->toThrow(). I have seen the following workarounds in the wild.

if ('always true') {
  self::markTestSkipped('skipping');
}

(): void ==> {
  self::markTestSkipped('skipping');
}();
Atry commented 2 years ago

LGTM