E1137: facade opens a name twice

View source

A facade decides how far a file or child directory reaches.

A facade decides how far a file or child directory reaches. open x; exports it to every unit, and open unit x; exports it only inside the unit (ADR-0111). One facade cannot do both for the same name, because the two lines say different things. The message names the module and the opened name.

Example

actus
import pkg;

verb main() {
    erg width = pkg::width();
}
actus
open size;
open unit size;
actus
open verb width() -> u8 {
    return 4u8;
}

Fix

Keep one of the two lines. Keep open size; when other units need the name, and open unit size; when only this unit does.

actus
import pkg;

verb main() {
    erg width = pkg::width();
}
actus
open size;
actus
open verb width() -> u8 {
    return 4u8;
}

Run actus explain E1137 in your terminal to read this entry offline. Browse Modules & rules or all error codes.