Skip to content

ICE: s.find(needle, from) on a str reaches MIR with no declared signature (BUG, exit 134) instead of a diagnostic #2358

Closed

Description

@ehartford

Spec §15 (strings); D65 (Sema resolves the call, MIR never re-derives it); "No silent fallbacks" (fail loudly with a diagnostic, never an ICE).

Repro (installed compiler, main a31a7df52):

fn main:
    let s = "abcabc"
    print(s.find("b", 2))

Actual: BUG: builtin method \find` argument 1 reached MIR with no declared signature (Sema resolves the BuiltinSigs ro…and exit 134 (abort). Expected: either the two-argument form exists (a start offset is the natural second argument, asrfind/index_of users keep wanting) or a diagnostic at the call: "find` takes one argument".

Found while a With tool script used s.find(block, first + 1); the crash made the script's edit silently not happen (the build then ran on unchanged sources). A check-time refusal would have stopped at the right place.

Activity

  1. added 2 commits that reference this issue on Oct 13, 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