Skip to content

Seed-built stage1: a user fn named is_digit hides std.re's is_digit ("not visible from this module"); stage2 from the same source accepts #1350

Closed

Description

@ehartford

Repro (isd.w):

fn is_digit(ch: u8) -> bool: ch > 1
fn main:
    print(f"{is_digit(5)}")

out/bootstrap/bin/with-stage1 check isd.w (stage1 built by the pinned seed from main + PR #1333, 2026-09-22):

error: symbol 'is_digit' is not visible from this module
 --> lib/std/re/defs.w:13:20
13 |     is_alpha(c) or is_digit(c)

out/stage/bin/with-stage2 check isd.w from the same tree: ok.

Two defects:

  1. A user program's top-level fn name leaks into the resolution of a stdlib module's own call (std.re resolves is_digit against the user's symbol, then reports it private). Also: why is std.re checked at all for a program that never uses it?
  2. stage1 and stage2 built from the same source disagree — the seed-built stage (or its embedded bundle interfaces, .wi) differs in behavior from the self-built one. Either the seed-built stdlib interface is stale/different, or a miscompile. :dev iterates on stage1, so every agent's targeted checks run on the compiler that has this bug.

Expected: user top-level names never affect a stdlib module's resolution (§ module privacy); stage1 == stage2 behavior.

Activity

  1. added 20 commits that reference this issue on Sep 23, 2026
  2. added a commit that references this issue on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions