OxL Reference

error import-conflict

error Standard: [§2.2]

What it means#

Two imports introduce the same name into a module and the name is actually used (§2.2). Merely having both imports is fine; the error appears at the first use, because the compiler cannot choose between them.

Example#

oxl✓ checked in CI
use std.comptime { Span }
use std.obs { Span }

fn describe(s: Span) -> i32 pure => 1      // <- import-conflict
error
import-conflict

How to fix#

oxl✓ checked in CI
use std.comptime { Span }
use std.obs { Span as TraceSpan }

fn describe(s: Span) -> i32 pure => 1
fn trace(s: TraceSpan) -> i32 pure => 2

Rename one of the imports with as, or avoid importing one of them.

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides