Skip to content

Zig correctly imports files using incorrect import paths #12304

@phan-do

Description

@phan-do

Zig Version

0.10.0-dev.3383+3cf8f283d

Steps to Reproduce

Wasn't able to reproduce locally with a new Zig project, but you can see the bug in the following files:

The import paths are incorrect. They should be ../../lib.zig, not ../../../lib.zig. The latter lands us in the root of the project instead of in src/, which is where lib.zig is.

Expected Behavior

Since the import paths are incorrect, a compiler error should have been raised.

Actual Behavior

Everything compiles successfully, tests are ran with no issues, and the project works perfectly fine as a package, with absolutely no issues whatsoever related to the aforementioned files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions