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

Drop support for the @ error suppression operator #360

@lexidor

Description

@lexidor

@ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions