You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
It's pretty obvious why -- type_of goes into an infinite loop since it substitutes typedefs, and then it needs to know the LLVM type of kitten in order to compute the type of kitten (since a class's type is just a struct of its fields). But not sure what to do. This should be permitted.
The example compiles if I change type to enum in type cat, since then the typedef won't be substituted. I think it's bad that the original program infinite-loops, but I don't see an easy way out of it. To compute the type of the outer class kitten I need to know the types of each of its fields, and then to know the size of the cat field I need to know the type of kitten.
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.
The text was updated successfully, but these errors were encountered: