facebook / facebook/hhvm

Bogus "Unrecognized user attribute: __Enforceable starts with __ but is not a standard attribute" error

Open
#8,706 1 comment 0 reactions 1 assignee Claimed by @Wilfred View on GitHub
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

**Describe the bug**

__Enforceable is a standard attribute. The error saying it is not one is wrong.

**Standalone code, or other way to reproduce the problem**

```hack
<<__Enforceable>>
type Foo = string;
```

```
$ hh_client
```

**Expected behavior**

```
Typing[4231] The __Enforceable attribute cannot be used on a typealias.
--> test.hack
1 | <<__Enforceable>>
| ^^^^^^^^^^^^^
```

**Actual behavior**

```
Naming[2049] Unrecognized user attribute: __Enforceable starts with __ but is not a standard attribute
--> test.hack
1 | <<__Enforceable>>
| ^^^^^^^^^^^^^

Typing[4231] The __Enforceable attribute cannot be used on a typealias.
--> test.hack
1 | <<__Enforceable>>
| ^^^^^^^^^^^^^
```

This is on 4.48.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.