A require declaration can only occur inside a non-shared module.

#2196   Compile-time error

A require declaration can only occur inside a non-shared module.

Additional Information

The current declaration or definition is qualified by REQUIRE but the current module is shared.

Explanation

The require qualification can not appear in modules declared as shared.