E0015: open import outside an import block

View source

open adds the names of an imported module to the current scope.

open adds the names of an imported module to the current scope. ADR-0087 requires the opening to be visible in the import block, so a standalone import open module; is rejected. The error points at the import statement.

Example

actus
import open std::time;

verb main() {
}

Fix

Write the import as a block and put open inside it.

actus
import { open std::time };

verb main() {
}

Run actus explain E0015 in your terminal to read this entry offline. Browse Lexer & parser or all error codes.