Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Drop support for the @ error suppression operator #360

Open
lexidor opened this issue Apr 20, 2021 · 1 comment
Open

Drop support for the @ error suppression operator #360

lexidor opened this issue Apr 20, 2021 · 1 comment

Comments

@lexidor
Copy link
Contributor

lexidor commented Apr 20, 2021

@ has been reserved for new attribute syntax.

<<__Memoize>>
function life(): int { return 42; }
// Becomes
@__Memoize
function life(): int { return 42; }

The typechecker option disallow_silence can be enabled to ban @ error suppression.
The typechecker option allow_new_attribute_syntax can be enabled to allow @Attribute support.
The runtime option hhvm.hack.lang.allow_new_attribute_syntax can be enabled to enable @Attribute support at runtime.

Hack OSS libs have typechecked with disallow_silence enabled since November of 2019. It has not been mentioned on the blog yet, so private codebases may very well still contain a lot of @fopen(__FILE__) code.

@lexidor
Copy link
Contributor Author

lexidor commented Jun 8, 2023

Refs #359

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant