Skip to content

"let f = @f;" causes iloop/irecurse #768

Closed

Description

@jruderman
fn main() {
    let f = @f;
    f();
}

Causes the compiler to iloop

fn main() {
    let f = @f;
}

Causes the compiler to output "Out of stack space, sorry"

Expected: "unresolved name: f" or "use before definition: f" or "cannot determine a type local variable: f".

Activity

  1. catamorphism commented on Jul 29, 2011

    @catamorphism
    Contributor

    This might be due to the lack of occurs check -- I'll look at it.

  2. msullivan commented on Aug 3, 2011

    @msullivan
    Contributor

    I strongly suspect it is.

  3. catamorphism commented on Aug 3, 2011

    @catamorphism
    Contributor

    Confirmed that subst_vars (in ty.rs) is going into an infinite loop. I'll work on implementing the occurs check.

  4. added a commit that references this issue on Dec 12, 2017
  5. added a commit that references this issue on Apr 23, 2020
  6. added a commit that references this issue on Nov 4, 2025
  7. added a commit that references this issue on Aug 21, 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

    A-type-systemI-crash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions