Closed
Description
This compiles and segfaults (or anyway prints weird values):
#![feature(struct_inherit)]
virtual struct Foo {
x: Box<int>
}
struct Bar : Foo;
fn main() {
println!("{}", Bar.x);
}
An inheriting tuple struct (surprisingly spelled eg. struct Bar : Foo (int, int);
too!) also compiles and does broken things.
Edit: The other way around is probably also wrong, with a non-record-like base struct.
Metadata
Metadata
Assignees
Labels
No labels