Skip to content

Infinite loop with a self-referential class #2572

Closed
@catamorphism

Description

@catamorphism
class kitten {
    let cat: option<cat>;
    new(cat: option<cat>) {
       self.cat = cat;
    }
}

type cat = @kitten;

fn main() {}

This program causes rustc to go into an infinite loop. I'd thought the infinite loop was in infer, but it seems to instead be in trans... so I'll keep looking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions